Jelajahi Sumber

适配glsms路径

YaolongHan 4 tahun lalu
induk
melakukan
022d40e778
1 mengubah file dengan 9 tambahan dan 1 penghapusan
  1. 9 1
      src/lib/parsers/STopologyParser.ts

+ 9 - 1
src/lib/parsers/STopologyParser.ts

@@ -93,7 +93,11 @@ export class STopologyParser extends SParser {
                 item.selectable = true;
                 this.zoneLegendList.push(item);
             }
-        } else if (t.GraphElementType == 'Image') {
+        } else if (t.GraphElementType == 'x') {
+            if(t.Properties){
+                t.Properties.Url ? t.Properties.Url ='glsms' + t.Properties.Url :t.Properties;
+                t.Properties.IconUrl ? t.Properties.IconUrl ='glsms' + t.Properties.IconUrl :t.Properties
+            }
             let item = new SImageLegendItem(null, t);
             item.selectable = true;
             this.imageLegendList.push(item);
@@ -107,6 +111,10 @@ export class STopologyParser extends SParser {
      * */
     private addMarker(t: Marker): void {
         if (t.Type == "Image") {
+            if(t.Properties){
+                t.Properties.Url ? t.Properties.Url ='glsms' + t.Properties.Url :t.Properties;
+                t.Properties.IconUrl ? t.Properties.IconUrl ='glsms' + t.Properties.IconUrl :t.Properties
+            }
             let item = new SImageMarkerItem(null, t);
             this.imageMarkerList.push(item);
             item.selectable = true;