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

Skip to content

Commit 806e6b7

Browse files
committed
update docs
1 parent be1f6a4 commit 806e6b7

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ Inspired by [gridster.js](http://gridster.net). Built with love.
2929
- [cell_height()](#cell_height)
3030
- [cell_height(val)](#cell_heightval)
3131
- [cell_width()](#cell_width)
32+
- [disable()](#disable)
33+
- [enable()](#enable)
3234
- [get_cell_from_pixel(position)](#get_cell_from_pixelposition)
3335
- [locked(el, val)](#lockedel-val)
3436
- [remove_widget(el)](#remove_widgetel)
@@ -227,6 +229,24 @@ grid.cell_height(grid.cell_width() * 1.2);
227229

228230
Gets current cell width.
229231

232+
### disable()
233+
234+
Disables widgets moving/resizing. This is a shortcut for:
235+
236+
```javascript
237+
grid.movable('.grid-stack-item', false);
238+
grid.resizable('.grid-stack-item', false);
239+
```
240+
241+
### enable()
242+
243+
Enables widgets moving/resizing. This is a shortcut for:
244+
245+
```javascript
246+
grid.movable('.grid-stack-item', true);
247+
grid.resizable('.grid-stack-item', true);
248+
```
249+
230250
### get_cell_from_pixel(position)
231251

232252
Get the position of the cell under a pixel on screen.
@@ -469,6 +489,7 @@ Changes
469489

470490
#### v0.2.3 (development version)
471491

492+
- add `disable`/`enable` methods
472493
- add `get_cell_from_pixel` (thanks to @juchi)
473494
- AMD support
474495
- fix nodes sorting

0 commit comments

Comments
 (0)