bugfix-复制插件clone逻辑

This commit is contained in:
walker 2023-05-23 13:04:14 +08:00
parent 132a4897ec
commit 2a58dbfc29
2 changed files with 1 additions and 1 deletions

View File

@ -959,7 +959,6 @@ export abstract class JlGraphicTemplate<G extends JlGraphic> {
g.loadState(state); g.loadState(state);
} }
g.id = GraphicIdGenerator.next(); g.id = GraphicIdGenerator.next();
g.repaint();
return g; return g;
} }
} }

View File

@ -71,6 +71,7 @@ export class GraphicCopyPlugin {
this.copys.push(clone); this.copys.push(clone);
this.container.position.set(0, 0); this.container.position.set(0, 0);
this.container.addChild(clone); this.container.addChild(clone);
clone.repaint();
}); });
this.app.canvas.on('mousemove', this.onPointerMove, this); this.app.canvas.on('mousemove', this.onPointerMove, this);
this.app.canvas.on('mouseup', this.onFinish, this); this.app.canvas.on('mouseup', this.onFinish, this);