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

Method disable

src/dd-draggable.ts:118–129  ·  view source on GitHub ↗
(forDestroy = false)

Source from the content-addressed store, hash-verified

116 }
117
118 public disable(forDestroy = false): void {
119 if (this.disabled === true) return;
120 super.disable();
121 this.dragEls.forEach(dragEl => {
122 dragEl.removeEventListener('mousedown', this._mouseDown);
123 if (isTouch) {
124 dragEl.removeEventListener('touchstart', touchstart);
125 dragEl.removeEventListener('pointerdown', pointerdown);
126 }
127 });
128 if (!forDestroy) this.el.classList.add('ui-draggable-disabled');
129 }
130
131 public destroy(): void {
132 if (this.dragTimeout) window.clearTimeout(this.dragTimeout);

Callers 1

destroyMethod · 0.95

Calls 1

addMethod · 0.45

Tested by

no test coverage detected