@@ -113,17 +113,17 @@ $(function () {
113
113
114
114
## Options
115
115
116
- - ` always_show_resize_handle ` - if ` true ` the resizing handles are shown even the user is not hovering over the widget
116
+ - ` always_show_resize_handle ` - if ` true ` the resizing handles are shown even if the user is not hovering over the widget
117
117
(default: ` false ` )
118
118
- ` animate ` - turns animation on (default: ` false ` )
119
- - ` auto ` - if ` false ` it tells to do not initialize existing items (default: ` true ` )
119
+ - ` auto ` - if ` false ` gridstack will not initialize existing items (default: ` true ` )
120
120
- ` cell_height ` - one cell height (default: ` 60 ` )
121
121
- ` draggable ` - allows to override jQuery UI draggable options. (default: ` {handle: '.grid-stack-item-content', scroll: true, appendTo: 'body'} ` )
122
122
- ` handle ` - draggable handle selector (default: ` '.grid-stack-item-content' ` )
123
123
- ` height ` - maximum rows amount. Default is ` 0 ` which means no maximum rows
124
124
- ` float ` - enable floating widgets (default: ` false ` ) See [ example] ( http://troolee.github.io/gridstack.js/demo/float.html )
125
125
- ` item_class ` - widget class (default: ` 'grid-stack-item' ` )
126
- - ` min_width ` - minimal width. If window width is less grid will be shown in one-column mode (default: ` 768 ` )
126
+ - ` min_width ` - minimal width. If window width is less, grid will be shown in one-column mode (default: ` 768 ` )
127
127
- ` placeholder_class ` - class for placeholder (default: ` 'grid-stack-placeholder' ` )
128
128
- ` resizable ` - allows to override jQuery UI resizable options. (default: ` {autoHide: true, handles: 'se'} ` )
129
129
- ` vertical_margin ` - vertical gap size (default: ` 20 ` )
@@ -144,8 +144,8 @@ $(function () {
144
144
- ` data-gs-no-move ` - disable element moving
145
145
- ` data-gs-auto-position ` - tells to ignore ` data-gs-x ` and ` data-gs-y ` attributes and to place element to the first
146
146
available position
147
- - ` data-gs-locked ` - the widget will be locked. It means another widgets couldn't move it during dragging or resizing.
148
- The widget is still can be dragged or resized. You need to add ` data-gs-no-resize ` and ` data-gs-no-move ` attributes
147
+ - ` data-gs-locked ` - the widget will be locked. It means another widget wouldn't be able to move it during dragging or resizing.
148
+ The widget can still be dragged or resized. You need to add ` data-gs-no-resize ` and ` data-gs-no-move ` attributes
149
149
to completely lock the widget.
150
150
151
151
## Events
@@ -214,8 +214,8 @@ Parameters:
214
214
- ` auto_position ` - if ` true ` then ` x ` , ` y ` parameters will be ignored and widget will be places on the first available
215
215
position
216
216
217
- Widget will be always placed even if result height will be more then grid height. You need to use ` will_it_fit ` method
218
- before call ` add_widget ` for additional check.
217
+ Widget will be always placed even if result height is more than actual grid height. You need to use ` will_it_fit ` method
218
+ before calling ` add_widget ` for additional check.
219
219
220
220
``` javascript
221
221
$ (' .grid-stack' ).gridstack ();
@@ -350,7 +350,7 @@ have `height` constraint.
350
350
351
351
``` javascript
352
352
if (grid .will_it_fit (new_node .x , new_node .y , new_node .width , new_node .height , true )) {
353
- grid .add_widget (new_node .x , new_node .y , new_node .width , new_node .height , true );
353
+ grid .add_widget (new_node .el , new_node . x , new_node .y , new_node .width , new_node .height , true );
354
354
}
355
355
else {
356
356
alert (' Not enough free space to place the widget' );
0 commit comments