Quellcode durchsuchen

选择器 resize传值修改

haojianlong vor 4 Jahren
Ursprung
Commit
65a4ab0e12

+ 3 - 4
persagy-web-graph/src/SGraphSelectContainer.ts

@@ -816,6 +816,7 @@ export class SGraphSelectContainer extends SGraphItem {
             // @ts-ignore
             const difY = event.y - this.curPoint.y;
             const mp = this.toParentChange(difX, difY);
+            const oldSize = new SSize(this.width, this.height);
             switch (this.curIndex) {
                 case 0:
                     this.moveTo(this.pos.x + mp.x, this.pos.y + mp.y);
@@ -853,10 +854,8 @@ export class SGraphSelectContainer extends SGraphItem {
                 default:
                     break;
             }
-            this.resize(
-                new SSize(this.oldWidth, this.oldHeight),
-                new SSize(this.width, this.height)
-            );
+            const newSize = new SSize(this.width, this.height);
+            this.resize(oldSize, newSize);
             this.calExtreme();
         } else {
             let flag = true;

+ 1 - 1
persagy-web-graph/src/items/SGraphPolyGroupItem.ts

@@ -43,7 +43,7 @@ export class SGraphPolyGroupItem extends SGraphShape {
     private minY = Number.MAX_SAFE_INTEGER;
     /** Y坐标最大值 */
     private maxY = Number.MIN_SAFE_INTEGER;
-    /** 轮廓线坐标list */
+    /** 多边形组轮廓线坐标list */
     private readonly pointList: SPoint[][] = [];
 
     /**