* Enables/Disables user resizing for specific grid elements. * For all items and future items, use enableResize() instead. No-op for static grids. * * @param els widget element(s) or selector to modify * @param val if true widget will be resizable, assuming the parent grid isn't noResize
(els: GridStackElement, val: boolean)
| 2254 | * grid.resizable('#fixed-size-widget', false); |
| 2255 | */ |
| 2256 | public resizable(els: GridStackElement, val: boolean): GridStack { |
| 2257 | if (this.opts.staticGrid) return this; // can't resize a static grid! |
| 2258 | GridStack.getElements(els).forEach(el => { |
| 2259 | const n = el.gridstackNode; |
| 2260 | if (!n) return; |
| 2261 | val ? delete n.noResize : n.noResize = true; |
| 2262 | this.prepareDragDrop(n.el); // init DD if need be, and adjust |
| 2263 | }); |
| 2264 | return this; |
| 2265 | } |
| 2266 | |
| 2267 | /** |
| 2268 | * Temporarily disables widgets moving/resizing. |
no test coverage detected