YaolongHan 4 年之前
父节点
当前提交
210c6c0390

文件差异内容过多而无法显示
+ 0 - 13016
package-lock.json


+ 2 - 2
package.json

@@ -9,10 +9,10 @@
   },
   "dependencies": {
     "@saga-web/base": "2.1.22",
-    "@saga-web/big": "1.0.50",
+    "@saga-web/big": "1.0.54",
     "@saga-web/draw": "2.1.100",
     "@saga-web/feng-map": "1.0.11",
-    "@saga-web/graph": "2.1.93",
+    "@saga-web/graph": "2.1.94",
     "@saga-web/topology": "1.0.84",
     "ant-design-vue": "^1.6.0",
     "core-js": "^3.6.4",

+ 5 - 5
src/components/edit/attr_select.vue

@@ -472,7 +472,7 @@ export default {
           this.backColor = Item.backgroundColor.value;
         } else if (newval.itemType == "baseLine") {
           this.lineWidth = Item.lineWidth;
-          this.borderColor = Item.strokeColor;
+          this.borderColor = Item.strokeColor.value;
         } else if (
           newval.itemType == "Zone" ||
           newval.itemType == "Line" ||
@@ -481,12 +481,12 @@ export default {
           this.lengedName = Item.data.Name;
           if (newval.itemType == "Image") {
             this.imageNum = Item.num;
-            this.color = Item.color;
+            this.color = Item.color.value;
             this.fontSize = Item.font.size;
           } else if (newval.itemType == "Line") {
-            this.color = Item.color;
-            this.fillColor = Item.fillColor;
-            this.borderColor = Item.strokeColor;
+            this.color = Item.color.value;
+            this.fillColor = Item.fillColor.value;
+            this.borderColor = Item.strokeColor.value;
             this.lineWidth = Item.lineWidth;
           }
         }

+ 17 - 15
src/components/mapClass/EditScence.ts

@@ -148,9 +148,10 @@ export class EditScence extends SGraphScene {
         item.zOrder = ItemOrder.lineOrder;
         item.selectable = true;
         this.addItem(item);
+        this.Markers.push(item);
         item.connect("finishCreated", this, this.finishCreated);
         this.grabItem = item;
-        this.Markers.push(item);
+        this.focusItem = item;
         this.scenceUpdate(this);
         // this.undoStack.push(new SGraphAddCommand(this, item));
         // item.connect("onMove", this, this.onItemMove.bind(this));
@@ -249,10 +250,10 @@ export class EditScence extends SGraphScene {
         Polylines.zOrder = ItemOrder.polygonOrder;
         // Polylines.moveable = true;
         this.addItem(Polylines);
+        this.Nodes.push(Polylines);
         Polylines.connect("finishCreated", this, this.finishCreated);
         this.grabItem = Polylines;
         this.focusItem = Polylines;
-        this.Nodes.push(Polylines);
         this.scenceUpdate(this);
     }
 
@@ -300,9 +301,9 @@ export class EditScence extends SGraphScene {
             //设置状态
             Polylines.status = SItemStatus.Normal;
             this.addItem(Polylines);
+            this.Nodes.push(Polylines);
             Polylines.connect("finishCreated", this, this.finishCreated);
             this.focusItem = Polylines;
-            this.Nodes.push(Polylines);
             this.scenceUpdate(this);
         }
     }
@@ -332,10 +333,10 @@ export class EditScence extends SGraphScene {
         item.selectable = true;
         item.moveable = true;
         this.addItem(item);
+        this.Markers.push(item);
         this.grabItem == null;
         this.focusItem = item;
         this.cmd = 'choice';
-        this.Markers.push(item);
         this.scenceUpdate(this);
     }
 
@@ -367,9 +368,10 @@ export class EditScence extends SGraphScene {
         item.moveable = true;
         item.zOrder = ItemOrder.textOrder;
         this.addItem(item);
-        this.grabItem == null
-        this.cmd = 'choice';
         this.Markers.push(item);
+        this.grabItem = item;
+        this.focusItem = item;
+        this.cmd = 'choice';
         this.scenceUpdate(this);
     }
 
@@ -392,21 +394,21 @@ export class EditScence extends SGraphScene {
                 IconUrl: '/serve/topology-wanda/Picture/query/' + this._legend.Url,
                 Url: '/serve/topology-wanda/Picture/query/' + this._legend.Url,
                 Num: 1, // 此num与信息工程化得num无关
-                sWidth: 0,  //icon 的宽
-                sHeight: 0,   //icon 的高
-                font: 0,    //font
+                sWidth: 24,  //icon 的宽
+                sHeight: 24,   //icon 的高
+                font: 12,    //font
                 color: ''  //字体颜色
             },
         }
         const item = new SImageLegendItem(null, LegendData);
-        this.grabItem == null
         this.cmd = 'choice';
         item.selectable = true;
         item.moveable = true;
         item.zOrder = ItemOrder.markOrder;
-        // item.moveTo(event.x, event.y);
         this.addItem(item);
         this.Nodes.push(item);
+        this.grabItem = item;
+        this.focusItem = item;
         this.scenceUpdate(this);
     }
 
@@ -478,10 +480,10 @@ export class EditScence extends SGraphScene {
     updatedBorderColor(color: string): void {
         if (this.focusItem) {
             if (this.focusItem instanceof SZoneLegendItem || this.focusItem instanceof SSCPZZoneLegendItem || this.focusItem instanceof SFHFQZoneLegendItem) {
-                this.focusItem.strokeColor = new SColor(color)
+                this.focusItem.strokeColor = new SColor(color);
             } else {
                 // let old = this.focusItem.strokeColor;
-                this.focusItem.strokeColor = color;
+                this.focusItem.strokeColor = new SColor(color);
             }
             // this.undoStack.push(new SGraphPropertyCommand(this, this.focusItem, "color", old, color));
         }
@@ -602,7 +604,7 @@ export class EditScence extends SGraphScene {
      */
     upadatfillColor(fillColor: string): void {
         if (this.focusItem && this.focusItem.fillColor) {
-            this.focusItem.fillColor = new SColor(fillColor)
+            this.focusItem.fillColor = new SColor(fillColor);
         }
     }
     /**
@@ -611,7 +613,7 @@ export class EditScence extends SGraphScene {
    */
     upadatitemExplain(itemExplain: string): void {
         if (this.focusItem) {
-            this.focusItem.itemExplain = itemExplain
+            this.focusItem.itemExplain = itemExplain;
         }
     }
 

+ 1 - 2
src/lib/items/SFHFQZoneLegendItem.ts

@@ -1,11 +1,10 @@
 
 import { SGraphItem } from "@saga-web/graph/lib";
-import { SPolygonItem } from "@/components/mapClass/SPolygonItem";
 import { Legend } from '../types/Legend';
 import { SPainter, SColor, SFont, SPoint, SLineCapStyle } from "@saga-web/draw";
 import { STextItem } from '@saga-web/graph/lib';
 import { hexify } from "@/components/mapClass/until"
-import { SItemStatus, ItemOrder } from '@saga-web/big/lib';
+import { SItemStatus, ItemOrder, SPolygonItem } from '@saga-web/big/lib';
 /**
  *图例节点Item(区域类型 --防火分区)
  *

+ 1 - 2
src/lib/items/SSCPZZoneLegendItem.ts

@@ -1,11 +1,10 @@
 
 import { SGraphItem } from "@saga-web/graph/lib";
-import { SPolygonItem } from "@/components/mapClass/SPolygonItem";
 import { Legend } from '../types/Legend';
 import { SPainter, SColor, SFont, SPoint, SLineCapStyle } from "@saga-web/draw";
 import { STextItem } from '@saga-web/graph/lib';
 import { hexify } from "@/components/mapClass/until"
-import { SItemStatus, ItemOrder } from '@saga-web/big/lib';
+import { SItemStatus, ItemOrder, SPolygonItem } from '@saga-web/big/lib';
 /**
  * 图例节点Item(区域类型 --石材铺装)
  *