diff --git a/src/jlgraphic/app/JlDrawApp.ts b/src/jlgraphic/app/JlDrawApp.ts index cf49b2e..22151c0 100644 --- a/src/jlgraphic/app/JlDrawApp.ts +++ b/src/jlgraphic/app/JlDrawApp.ts @@ -102,7 +102,9 @@ export abstract class GraphicDrawAssistant< unbind(): void { this.clearCache(); const canvas = this.canvas; - canvas.removeChild(this.container); + if (this.container?.parent) { + canvas.removeChild(this.container); + } canvas.off('mousedown', this.onLeftDown, this); canvas.off('mousemove', this.onMouseMove, this); canvas.off('mouseup', this.onLeftUp, this);