* 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)
| 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() { |
no test coverage detected