Skip to content

Commit 1d077e7

Browse files
committed
doc update in movable()/resizable()
1 parent abdeb3b commit 1d077e7

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

doc/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,8 @@ gap between grid item and content (default?: 10). This will set all 4 sides and
491491

492492
### `movable(el, val)`
493493

494-
Enables/Disables moving.
494+
Enables/Disables dragging by the user of specific grid element. If you want all items, and have it affect future items, use enableMove() instead. No-op for static grids.
495+
IF you are looking to prevent an item from moving (due to being pushed around by another during collision) use locked property instead.
495496

496497
- `el` - widget to modify
497498
- `val` - if `true` widget will be draggable.
@@ -516,7 +517,7 @@ Parameters:
516517

517518
### `resizable(el, val)`
518519

519-
Enables/Disables resizing.
520+
Enables/Disables user resizing of specific grid element. If you want all items, and have it affect future items, use enableResize() instead. No-op for static grids.
520521

521522
- `el` - widget to modify
522523
- `val` - if `true` widget will be resizable.

src/gridstack.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1468,13 +1468,14 @@ export class GridStack {
14681468
public static setupDragIn(dragIn?: string, dragInOptions?: DDDragInOpt): void { /* implemented in gridstack-dd.ts */ }
14691469

14701470
/**
1471-
* Enables/Disables moving of specific grid elements. If you want all items, and have it stay, use enableMove() instead. No-op for static grids.
1471+
* Enables/Disables dragging by the user of specific grid element. If you want all items, and have it affect future items, use enableMove() instead. No-op for static grids.
1472+
* IF you are looking to prevent an item from moving (due to being pushed around by another during collision) use locked property instead.
14721473
* @param els widget or selector to modify.
14731474
* @param val if true widget will be draggable.
14741475
*/
14751476
public movable(els: GridStackElement, val: boolean): GridStack { return this }
14761477
/**
1477-
* Enables/Disables resizing of specific grid elements. If you want all items, and have it stay, use enableResize() instead. No-op for static grids.
1478+
* Enables/Disables user resizing of specific grid element. If you want all items, and have it affect future items, use enableResize() instead. No-op for static grids.
14781479
* @param els widget or selector to modify
14791480
* @param val if true widget will be resizable.
14801481
*/

0 commit comments

Comments
 (0)