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
As of v0.2.5 all methods and parameters are in camel case to respect [JavaScript Style Guide and Coding Conventions](http://www.w3schools.com/js/js_conventions.asp).
158
+
All old methods and parameters are marked as deprecated and still available but a warning will be displayed in js console. They will be available until v1.0
159
+
when they will be completely removed.
160
+
154
161
## Options
155
162
156
-
-`always_show_resize_handle` - if `true` the resizing handles are shown even if the user is not hovering over the widget
163
+
-`alwaysShowResizeHandle` - if `true` the resizing handles are shown even if the user is not hovering over the widget
157
164
(default: `false`)
158
165
-`animate` - turns animation on (default: `false`)
159
166
-`auto` - if `false` gridstack will not initialize existing items (default: `true`)
160
-
-`cell_height` - one cell height (default: `60`). Can be:
167
+
-`cellHeight` - one cell height (default: `60`). Can be:
161
168
- an integer (px)
162
169
- a string (ex: '10em', '100px', '10rem')
163
170
- 0 or null, in which case the library will not generate styles for rows. Everything will have to be defined in CSS files.
-`handle_class` - draggable handle class (e.g. `'grid-stack-item-content'`). If set `handle` is ignored (default: `null`)
173
+
-`handleClass` - draggable handle class (e.g. `'grid-stack-item-content'`). If set `handle` is ignored (default: `null`)
167
174
-`height` - maximum rows amount. Default is `0` which means no maximum rows
168
175
-`float` - enable floating widgets (default: `false`) See [example](http://troolee.github.io/gridstack.js/demo/float.html)
169
-
-`item_class` - widget class (default: `'grid-stack-item'`)
170
-
-`min_width` - minimal width. If window width is less, grid will be shown in one-column mode. You need also update your css file (`@media (max-width: 768px) {...}`) with corresponding value (default: `768`)
171
-
-`placeholder_class` - class for placeholder (default: `'grid-stack-placeholder'`)
-`itemClass` - widget class (default: `'grid-stack-item'`)
177
+
-`minWidth` - minimal width. If window width is less, grid will be shown in one-column mode. You need also update your css file (`@media (max-width: 768px) {...}`) with corresponding value (default: `768`)
178
+
-`placeholderClass` - class for placeholder (default: `'grid-stack-placeholder'`)
-`static_grid` - makes grid static (default `false`). If true widgets are not movable/resizable. You don't even need jQueryUI draggable/resizable. A CSS class `grid-stack-static` is also added to the container.
175
-
-`vertical_margin` - vertical gap size (default: `20`). Can be:
181
+
-`staticGrid` - makes grid static (default `false`). If true widgets are not movable/resizable. You don't even need jQueryUI draggable/resizable. A CSS class `grid-stack-static` is also added to the container.
182
+
-`verticalMargin` - vertical gap size (default: `20`). Can be:
176
183
- an integer (px)
177
184
- a string (ex: '2em', '20px', '2rem')
178
185
-`width` - amount of columns (default: `12`)
@@ -204,12 +211,12 @@ to completely lock the widget.
204
211
Occurs when adding/removing widgets or existing widgets change their position/size
205
212
206
213
```javascript
207
-
varserialize_widget_map=function (items) {
214
+
varserializeWidgetMap=function (items) {
208
215
console.log(items);
209
216
};
210
217
211
218
$('.grid-stack').on('change', function (e, items) {
-`auto_position` - if `true` then `x`, `y` parameters will be ignored and widget will be places on the first available
285
+
-`autoPosition` - if `true` then `x`, `y` parameters will be ignored and widget will be places on the first available
279
286
position
280
287
281
288
Widget will be always placed even if result height is more than actual grid height. You need to use `will_it_fit` method
@@ -285,10 +292,10 @@ before calling `add_widget` for additional check.
285
292
$('.grid-stack').gridstack();
286
293
287
294
var grid =$('.grid-stack').data('gridstack');
288
-
grid.add_widget(el, 0, 0, 3, 2, true);
295
+
grid.addWidget(el, 0, 0, 3, 2, true);
289
296
```
290
297
291
-
### make_widget(el)
298
+
### makeWidget(el)
292
299
293
300
If you add elements to your gridstack container by hand, you have to tell gridstack afterwards to make them widgets. If you want gridstack to add the elements for you, use `add_widget` instead.
0 commit comments