You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- add `save()` and `restore()` to serialize grids from JSON, saving all attributes (not just w,h,x,y) [1286](https://github.com/gridstack/gridstack.js/issues/1286)
-[update(el, x, y, width, height)](#updateel-x-y-width-height)
@@ -83,6 +86,8 @@ gridstack.js API
83
86
-`disableDrag` - disallows dragging of widgets (default: `false`).
84
87
-`disableOneColumnMode` - disables the onColumnMode when the grid width is less than minWidth (default: 'false')
85
88
-`disableResize` - disallows resizing of widgets (default: `false`).
89
+
-`dragIn` - specify the class of items that can be dragged into the grid (ex: dragIn: '.newWidget'
90
+
-`dragInOptions` - options for items that can be dragged into the grid (ex: dragInOptions: { revert: 'invalid', scroll: false, appendTo: 'body', helper: 'clone' }
- used to restore a grid layout for a saved layout list (see `save()`).
479
+
- Optional `addAndRemove` can be passed if new widgets should be added or removed if the are not present (`id` is used to look items up)
480
+
- see [example](http://gridstackjs.com/demo/serialization.html)
481
+
482
+
### save(): GridStackWidget[]
483
+
484
+
- returns the layout of the grid that can be serialized (list of item non default attributes, not just w,y,x,y but also min/max and id). See `restore()`
485
+
- see [example](http://gridstackjs.com/demo/serialization.html)
486
+
467
487
### setAnimation(doAnimate)
468
488
469
489
Toggle the grid animation state. Toggles the `grid-stack-animate` class.
0 commit comments