bill 1 년 전
부모
커밋
e4babd6c5e
1개의 변경된 파일2개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 3
      src/board/plugins/bound-plugin.ts

+ 2 - 3
src/board/plugins/bound-plugin.ts

@@ -2,7 +2,6 @@ import { Matrix3, Vector2 } from "three";
 import { Container } from "../packages";
 import { openShapeDrag } from "../shared";
 import { getAbsoluteTransform } from "../shared/shape-helper";
-import { Layer } from "konva/lib/Layer";
 
 export type BoundQueryPluginProps = {
   move?: boolean;
@@ -170,11 +169,11 @@ export class BoundQueryPlugin {
     // 更新Konva Stage的位置和缩放
     stage.scale({ x: scaleX, y: scaleY });
     stage.position({ x: offsetX, y: offsetY });
-    this.tree.redraw();
     this.tree.bus.emit("viewChange", {
       mat: stage.getTransform(),
       size: [stage.width(), stage.height()],
     });
-    (this.tree.shape as Layer).batchDraw();
+    this.tree.redraw();
+    this.tree.stage.draw();
   }
 }