Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1accc45

Browse files
committed
update docs
1 parent 80f3b33 commit 1accc45

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ $(function () {
7878
- `data-gs-no-move` - disable element moving
7979
- `data-gs-auto-position` - tells to ignore `data-gs-x` and `data-gs-y` attributes and to place element to the first
8080
available position
81+
- `data-gs-locked` - the widget will be locked. It means another widgets couldn't move it during dragging or resizing.
82+
The widget is still can be dragged or resized. You need to add `data-gs-no-resize` and `data-gs-no-move` attributes
83+
to completely lock the widget.
8184

8285
## Events
8386

@@ -155,6 +158,13 @@ var grid = $('.grid-stack').data('gridstack');
155158
grid.add_widget(el, 0, 0, 3, 2, true);
156159
```
157160

161+
### locked(el, val)
162+
163+
Locks/unlocks widget.
164+
165+
- `el` - widget to modify.
166+
- `val` - if `true` widget will be locked.
167+
158168
### remove_widget(el)
159169

160170
Removes widget from the grid.
@@ -283,6 +293,7 @@ Changes
283293

284294
#### v0.2.1 (Current development version)
285295

296+
- add widgets locking (issue #19)
286297
- add `will_it_fit` API method
287298
- fix auto-positioning (issue #20)
288299
- add animation (thanks to @ishields)

0 commit comments

Comments
 (0)