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();
   }
 }