移除容器前判断父元素是否存在
This commit is contained in:
parent
729a3c25b4
commit
65f8e53e6b
@ -102,7 +102,9 @@ export abstract class GraphicDrawAssistant<
|
||||
unbind(): void {
|
||||
this.clearCache();
|
||||
const canvas = this.canvas;
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user