Selaa lähdekoodia

Merge branch 'develop' of http://39.106.8.246:3003/web/wanda-editer into develop

haojianlong 4 vuotta sitten
vanhempi
commit
7f41c5577f
2 muutettua tiedostoa jossa 8 lisäystä ja 7 poistoa
  1. 2 1
      src/components/mapClass/EditScence.ts
  2. 6 6
      src/lib/items/SImageLegendItem.ts

+ 2 - 1
src/components/mapClass/EditScence.ts

@@ -143,7 +143,8 @@ export class EditScence extends SGraphScene {
             /** 由应用自己定义  */
             Properties: {
                 IconUrl: require("../../assets/images/t-line-hover.png"),
-                Line: [{ X: event.x, Y: event.y }]
+                Line: [{ X: event.x, Y: event.y }],
+                LineWidth: 2
             }
         }
         const item = new SLineMarkerItem(null, data);

+ 6 - 6
src/lib/items/SImageLegendItem.ts

@@ -56,12 +56,6 @@ export class SImageLegendItem extends SIconTextItem {
         if (data.Properties && data.Properties.Url) {
             this.img.url = data.Properties.Url;
         }
-        if (data.Properties.ImgPos) {
-            this.img.moveTo(data.Properties.ImgPos.X, data.Properties.ImgPos.Y);
-        }
-        if (data.Properties.TextPos) {
-            this.textItem.moveTo(data.Properties.TextPos.X, data.Properties.TextPos.Y);
-        }
         if (data.Properties && data.Properties.sWidth) {
             this.sWidth = data.Properties.sWidth;
         }
@@ -74,6 +68,12 @@ export class SImageLegendItem extends SIconTextItem {
         if (data.Properties && data.Properties.color) {
             this.color = new SColor(data.Properties.color);
         }
+        if (data.Properties.ImgPos) {
+            this.img.moveTo(data.Properties.ImgPos.X, data.Properties.ImgPos.Y);
+        }
+        if (data.Properties.TextPos) {
+            this.textItem.moveTo(data.Properties.TextPos.X, data.Properties.TextPos.Y);
+        }
     }
 
     toData(): Legend {