Browse Source

选择器 resize调整

haojianlong 4 năm trước cách đây
mục cha
commit
f27cbe3a1a
1 tập tin đã thay đổi với 4 bổ sung1 xóa
  1. 4 1
      persagy-web-graph/src/SGraphSelectContainer.ts

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

@@ -758,6 +758,9 @@ export class SGraphSelectContainer extends SGraphItem {
         for (let v of this.itemList) {
             // @ts-ignore
             v.resize && v.resize(oldSize, newSize);
+            const p = v.mapToScene(this.pos.x, this.pos.y);
+            const p2 = v.mapFromScene(p.x, p.y);
+            v.moveTo(p2.x - v.boundingRect().x, p2.y - v.boundingRect().y);
         }
     } // Function resize()
 
@@ -891,7 +894,7 @@ export class SGraphSelectContainer extends SGraphItem {
         painter.drawRect(0, 0, this.width, this.height);
 
         painter.pen.color = SColor.Black;
-        painter.pen.lineDash = [painter.toPx(3), painter.toPx(3)];
+        painter.pen.lineDash = [painter.toPx(4), painter.toPx(4)];
         painter.drawRect(0, 0, this.width, this.height);
 
         const r = painter.toPx(this.radius);