Переглянути джерело

折线item2点就可以创建

haojianlong 5 роки тому
батько
коміт
a22033345b

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

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

+ 2 - 2
saga-web-big/src/items/SPolylineItem.ts

@@ -264,7 +264,7 @@ export class SPolylineItem extends SGraphItem {
             this.status = SItemStatus.Normal;
             this.releaseItem();
         } else if (this.status == SItemStatus.Create) {
-            if (this.pointList.length > 2) {
+            if (this.pointList.length > 1) {
                 this.status = SItemStatus.Normal;
                 this.releaseItem();
                 this.$emit("finishCreated");
@@ -281,7 +281,7 @@ export class SPolylineItem extends SGraphItem {
      */
     onKeyUp(event: KeyboardEvent): void {
         if (event.keyCode == SKeyCode.Enter) {
-            if (this.pointList.length > 2) {
+            if (this.pointList.length > 1) {
                 if (this.status == SItemStatus.Create) {
                     this.$emit("finishCreated");
                 }

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

@@ -1,6 +1,6 @@
 {
     "name": "@saga-web/feng-map",
-    "version": "1.0.29",
+    "version": "1.0.30",
     "description": "上格云Web平面图。",
     "main": "lib/index.js",
     "types": "lib/index.d.js",
@@ -33,7 +33,7 @@
         "typescript": "^3.9.3"
     },
     "dependencies": {
-        "@saga-web/big": "1.0.95",
+        "@saga-web/big": "1.0.96",
         "axios": "^0.18.0"
     }
 }