call this when resize handle needs to be removed and cleaned up
()
| 68 | |
| 69 | /** call this when resize handle needs to be removed and cleaned up */ |
| 70 | public destroy(): DDResizableHandle { |
| 71 | if (this.moving) this._mouseUp(this.mouseDownEvent); |
| 72 | this.el.removeEventListener('mousedown', this._mouseDown); |
| 73 | if (isTouch) { |
| 74 | this.el.removeEventListener('touchstart', touchstart); |
| 75 | this.el.removeEventListener('pointerdown', pointerdown); |
| 76 | } |
| 77 | if (!this.option.element) { |
| 78 | this.host.removeChild(this.el); |
| 79 | } |
| 80 | delete this.el; |
| 81 | delete this.host; |
| 82 | return this; |
| 83 | } |
| 84 | |
| 85 | /** @internal called on mouse down on us: capture move on the entire document (mouse might not stay on us) until we release the mouse */ |
| 86 | protected _mouseDown(e: MouseEvent): void { |