MCPcopy Index your code
hub / github.com/gridstack/gridstack.js / destroy

Method destroy

src/dd-resizable-handle.ts:70–83  ·  view source on GitHub ↗

call this when resize handle needs to be removed and cleaned up

()

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 1

_mouseUpMethod · 0.95

Tested by

no test coverage detected