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

Method disable

src/gridstack.ts:2289–2295  ·  view source on GitHub ↗

* Temporarily disables widgets moving/resizing. * If you want a more permanent way (which freezes up resources) use `setStatic(true)` instead. * * Note: This is a no-op for static grids. * * This is a shortcut for: * ```typescript * grid.enableMove(false); * grid.enableResize

(recurse = true)

Source from the content-addressed store, hash-verified

2287 * grid.disable(false);
2288 */
2289 public disable(recurse = true): GridStack {
2290 if (this.opts.staticGrid) return;
2291 this.enableMove(false, recurse);
2292 this.enableResize(false, recurse);
2293 this._triggerEvent('disable');
2294 return this;
2295 }
2296 /**
2297 * Re-enables widgets moving/resizing - see disable().
2298 * Note: This is a no-op for static grids.

Calls 3

enableMoveMethod · 0.95
enableResizeMethod · 0.95
_triggerEventMethod · 0.95

Tested by

no test coverage detected