* Enables/Disables dragging by the user for specific grid elements. * For all items and future items, use enableMove() instead. No-op for static grids. * * Note: If you want to prevent an item from moving due to being pushed around by another * during collision, use the 'locked' property
(els: GridStackElement, val: boolean)
| 2228 | * grid.movable('#fixed-widget', false); |
| 2229 | */ |
| 2230 | public movable(els: GridStackElement, val: boolean): GridStack { |
| 2231 | if (this.opts.staticGrid) return this; // can't move a static grid! |
| 2232 | GridStack.getElements(els).forEach(el => { |
| 2233 | const n = el.gridstackNode; |
| 2234 | if (!n) return; |
| 2235 | val ? delete n.noMove : n.noMove = true; |
| 2236 | this.prepareDragDrop(n.el); // init DD if need be, and adjust |
| 2237 | }); |
| 2238 | return this; |
| 2239 | } |
| 2240 | |
| 2241 | /** |
| 2242 | * Enables/Disables user resizing for specific grid elements. |
nothing calls this directly
no test coverage detected