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

Method enableResize

src/gridstack.ts:2370–2378  ·  view source on GitHub ↗

* Enables/disables widget resizing for all widgets. No-op for static grids. * Note: locally defined items (with noResize property) still override this setting. * * @param doEnable if true widgets will be resizable, if false resizing is disabled * @param recurse if true (default), sub-gri

(doEnable: boolean, recurse = true)

Source from the content-addressed store, hash-verified

2368 * grid.enableResize(true, false);
2369 */
2370 public enableResize(doEnable: boolean, recurse = true): GridStack {
2371 if (this.opts.staticGrid) return this; // can't size a static grid!
2372 doEnable ? delete this.opts.disableResize : this.opts.disableResize = true; // FIRST before we update children as grid overrides #1658
2373 this.engine.nodes.forEach(n => {
2374 this.prepareDragDrop(n.el);
2375 if (n.subGrid && recurse) n.subGrid.enableResize(doEnable, recurse);
2376 });
2377 return this;
2378 }
2379
2380 /** @internal call when drag (and drop) needs to be cancelled (Esc key) */
2381 public cancelDrag() {

Callers 4

updateOptionsMethod · 0.95
disableMethod · 0.95
enableMethod · 0.95
gridstack-spec.tsFile · 0.80

Calls 1

prepareDragDropMethod · 0.95

Tested by

no test coverage detected