Ver código fonte

锚点,折线item修改

haojianlong 5 anos atrás
pai
commit
98074f229d

+ 1 - 1
saga-web-big/package.json

@@ -1,6 +1,6 @@
 {
     "name": "@saga-web/big",
-    "version": "1.0.22",
+    "version": "1.0.23",
     "description": "上格云建筑信息化库",
     "main": "lib/index.js",
     "types": "lib/index.d.js",

+ 6 - 0
saga-web-big/src/items/SPolylineItem.ts

@@ -206,8 +206,14 @@ export class SPolylineItem extends SGraphItem {
     onDoubleClick(event: SMouseEvent): boolean {
         if (this.status == SItemStatus.Normal) {
             this.status = SItemStatus.Edit;
+            if (this.scene) {
+                this.scene.grabItem = this;
+            }
         } else if (this.status == SItemStatus.Edit) {
             this.status = SItemStatus.Normal;
+            if (this.scene) {
+                this.scene.grabItem = null;
+            }
         } else if (this.status == SItemStatus.Create) {
             this.status = SItemStatus.Edit;
         }

+ 1 - 1
saga-web-big/src/items/topology/SAnchorItem.ts

@@ -25,7 +25,7 @@ export class SAnchorItem extends SGraphItem {
      */
     onDraw(painter: SPainter): void {
         this.sceneDis = painter.toPx(this.dis);
-        painter.pen.lineWidth = 1;
+        painter.pen.lineWidth = painter.toPx(1);
         painter.pen.color = new SColor("#2196f3");
         painter.brush.color = SColor.White;
         if (this.isConnected) {