Преглед на файлове

Merge branch 'master' of http://39.106.8.246:3003/web/sagacloud-web

haojianlong преди 5 години
родител
ревизия
d1fe2671f4
променени са 2 файла, в които са добавени 8 реда и са изтрити 5 реда
  1. 4 4
      saga-web-big/src/items/SIconTextItem.ts
  2. 4 1
      saga-web-big/src/items/SPolygonItem.ts

+ 4 - 4
saga-web-big/src/items/SIconTextItem.ts

@@ -79,7 +79,7 @@ export class SIconTextItem extends SObjectItem {
       return this.img.width;
     }
     set sWidth(v: number) {
-      this.img.width = v
+      this.img.width = v;
       this.update();
     }
 
@@ -88,7 +88,7 @@ export class SIconTextItem extends SObjectItem {
       return this.img.height;
     }
     set sHeight(v: number) {
-      this.img.height = v
+      this.img.height = v;
       this.update();
     }
 
@@ -138,8 +138,8 @@ export class SIconTextItem extends SObjectItem {
     constructor(parent: SGraphItem | null) {
       super(parent);
       this.img.url = `http://adm.sagacloud.cn:8080/doc/assets/img/logo.png`;
-      this.img.width = 12;
-      this.img.height = 12;
+      this.img.width = 24;
+      this.img.height = 24;
       let anchorPoint = [{ x: 0, y: this.img.height / 2 }, { x: 0, y: -this.img.height / 2 }, { x: -this.img.width / 2, y: 0 }, { x: this.img.width / 2, y: 0 }];
       this.anchorList = anchorPoint.map(t => {
         let item = new SAnchorItem(this);

+ 4 - 1
saga-web-big/src/items/SPolygonItem.ts

@@ -526,7 +526,10 @@ export class SPolygonItem extends SGraphItem {
             if (event.key == "Alt") {
                 this.isAlt = false;
             } else if (event.keyCode == SKeyCode.Delete) {
-                this.deletePoint(this.curIndex);
+                // 当多边形的顶点大于三个允许删除点
+                if (this.pointList.length > 3) {
+                    this.deletePoint(this.curIndex);
+                }
             }
         }
         this.update();