haojianlong 5 anni fa
parent
commit
91592cd730

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

@@ -1,6 +1,6 @@
 {
     "name": "@saga-web/big",
-    "version": "1.0.83",
+    "version": "1.0.86",
     "description": "上格云建筑信息化库",
     "main": "lib/index.js",
     "types": "lib/index.d.js",
@@ -42,6 +42,6 @@
         "typescript": "^3.9.3"
     },
     "dependencies": {
-        "@saga-web/graph": "2.1.111"
+        "@saga-web/graph": "2.1.112"
     }
 }

+ 16 - 8
saga-web-big/src/items/SIconTextItem.ts

@@ -197,10 +197,14 @@ export class SIconTextItem extends SObjectItem {
             });
         } else {
             anchorPoint = [
-                { x: this.img.x, y: this.img.y + this.img.height / 2, id: "" },
-                { x: this.img.x, y: this.img.y - this.img.height / 2, id: "" },
-                { x: this.img.x - this.img.width / 2, y: this.img.y, id: "" },
-                { x: this.img.x + this.img.width / 2, y: this.img.y, id: "" }
+                { x: this.img.x, y: this.img.y, id: "" },
+                { x: this.img.x, y: this.img.y, id: "" },
+                { x: this.img.x, y: this.img.y, id: "" },
+                { x: this.img.x, y: this.img.y, id: "" }
+                // { x: this.img.x, y: this.img.y + this.img.height / 2, id: "" },
+                // { x: this.img.x, y: this.img.y - this.img.height / 2, id: "" },
+                // { x: this.img.x - this.img.width / 2, y: this.img.y, id: "" },
+                // { x: this.img.x + this.img.width / 2, y: this.img.y, id: "" }
             ];
         }
         this.anchorList = anchorPoint.map(t => {
@@ -228,10 +232,14 @@ export class SIconTextItem extends SObjectItem {
         // 判断是否有锚点
         if (this.anchorList.length) {
             let anchorPoint = [
-                { x: this.img.x, y: this.img.y + this.img.height / 2 },
-                { x: this.img.x, y: this.img.y - this.img.height / 2 },
-                { x: this.img.x - this.img.width / 2, y: this.img.y },
-                { x: this.img.x + this.img.width / 2, y: this.img.y }
+                { x: this.img.x, y: this.img.y },
+                { x: this.img.x, y: this.img.y },
+                { x: this.img.x, y: this.img.y },
+                { x: this.img.x, y: this.img.y }
+                // { x: this.img.x, y: this.img.y + this.img.height / 2 },
+                // { x: this.img.x, y: this.img.y - this.img.height / 2 },
+                // { x: this.img.x - this.img.width / 2, y: this.img.y },
+                // { x: this.img.x + this.img.width / 2, y: this.img.y }
             ];
             this.anchorList.forEach((item, index) => {
                 item.moveTo(anchorPoint[index].x, anchorPoint[index].y);

+ 3 - 1
saga-web-big/src/items/SPolylineItem.ts

@@ -279,9 +279,11 @@ export class SPolylineItem extends SGraphItem {
      */
     onKeyUp(event: KeyboardEvent): void {
         if (event.keyCode == SKeyCode.Enter) {
+            if (this.status == SItemStatus.Create) {
+                this.$emit("finishCreated");
+            }
             this.status = SItemStatus.Normal;
             this.releaseItem();
-            this.$emit("finishCreated");
         }
         // delete删除点
         if (

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

@@ -1,6 +1,6 @@
 {
     "name": "@saga-web/graph",
-    "version": "2.1.111",
+    "version": "2.1.112",
     "description": "上格云二维图形引擎。",
     "main": "lib/index.js",
     "types": "lib/index.d.js",

+ 1 - 1
saga-web-graph/src/items/SAnchorItem.ts

@@ -17,7 +17,7 @@ export class SAnchorItem extends SGraphItem {
     /** 全局灵敏度   */
     dis: number = 3;
     /** 灵敏度转换为场景长度  */
-    sceneDis: number = 10;
+    sceneDis: number = 3;
 
     /**
      * 构造函数