@@ -7,6 +7,53 @@ touch devices.
7
7
8
8
Inspired by [ gridster.js] ( http://gridster.net ) . Built with love.
9
9
10
+ <!-- START doctoc generated TOC please keep comment here to allow auto update -->
11
+ <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
12
+ ** Table of Contents** * generated with [ DocToc] ( https://github.com/thlorenz/doctoc ) *
13
+
14
+ - [ Demo] ( #demo )
15
+ - [ Usage] ( #usage )
16
+ - [ Requirements] ( #requirements )
17
+ - [ Basic usage] ( #basic-usage )
18
+ - [ Options] ( #options )
19
+ - [ Grid attributes] ( #grid-attributes )
20
+ - [ Item attributes] ( #item-attributes )
21
+ - [ Events] ( #events )
22
+ - [ onchange(items)] ( #onchangeitems )
23
+ - [ ondragstart(event, ui)] ( #ondragstartevent-ui )
24
+ - [ ondragstop(event, ui)] ( #ondragstopevent-ui )
25
+ - [ onresizestart(event, ui)] ( #onresizestartevent-ui )
26
+ - [ onresizestop(event, ui)] ( #onresizestopevent-ui )
27
+ - [ API] ( #api )
28
+ - [ add_widget(el, x, y, width, height, auto_position)] ( #add_widgetel-x-y-width-height-auto_position )
29
+ - [ cell_height()] ( #cell_height )
30
+ - [ cell_height(val)] ( #cell_heightval )
31
+ - [ cell_width()] ( #cell_width )
32
+ - [ locked(el, val)] ( #lockedel-val )
33
+ - [ remove_widget(el)] ( #remove_widgetel )
34
+ - [ remove_all()] ( #remove_all )
35
+ - [ resize(el, width, height)] ( #resizeel-width-height )
36
+ - [ move(el, x, y)] ( #moveel-x-y )
37
+ - [ resizable(el, val)] ( #resizableel-val )
38
+ - [ movable(el, val)] ( #movableel-val )
39
+ - [ will_it_fit(x, y, width, height, auto_position)] ( #will_it_fitx-y-width-height-auto_position )
40
+ - [ Utils] ( #utils )
41
+ - [ GridStackUI.Utils.sort(nodes, dir, width)] ( #gridstackuiutilssortnodes-dir-width )
42
+ - [ Touch devices support] ( #touch-devices-support )
43
+ - [ Use with knockout.js] ( #use-with-knockoutjs )
44
+ - [ Change grid width] ( #change-grid-width )
45
+ - [ Load grid from array] ( #load-grid-from-array )
46
+ - [ Changes] ( #changes )
47
+ - [ v0.2.3 (development version)] ( #v023-development-version )
48
+ - [ v0.2.2 (2014-12-23)] ( #v022-2014-12-23 )
49
+ - [ v0.2.1 (2014-12-09)] ( #v021-2014-12-09 )
50
+ - [ v0.2.0 (2014-11-30)] ( #v020-2014-11-30 )
51
+ - [ v0.1.0 (2014-11-18)] ( #v010-2014-11-18 )
52
+ - [ License] ( #license )
53
+
54
+ <!-- END doctoc generated TOC please keep comment here to allow auto update -->
55
+
56
+
10
57
Demo
11
58
====
12
59
@@ -198,7 +245,7 @@ Parameters:
198
245
199
246
Removes all widgets from the grid.
200
247
201
- ### resize(el, width, \[ height\] )
248
+ ### resize(el, width, height)
202
249
203
250
Changes widget size
204
251
@@ -207,7 +254,7 @@ Parameters:
207
254
- ` el ` - widget to resize
208
255
- ` width ` , ` height ` - new dimensions. If value is ` null ` or ` undefined ` it will be ignored.
209
256
210
- ### move(el, x, \[ y \] )
257
+ ### move(el, x, y )
211
258
212
259
Changes widget position
213
260
@@ -247,13 +294,13 @@ else {
247
294
248
295
## Utils
249
296
250
- ### GridStackUI.Utils.sort(nodes, \[ dir\] , \[ width\] )
297
+ ### GridStackUI.Utils.sort(nodes, dir, width)
251
298
252
299
Sorts array of nodes
253
300
254
301
- ` nodes ` - array to sort
255
- - ` dir ` - ` 1 ` for asc, ` -1 ` for desc
256
- - ` width ` - width of the grid. If ` undefined ` the width will be calculated automatically.
302
+ - ` dir ` - ` 1 ` for asc, ` -1 ` for desc (optional)
303
+ - ` width ` - width of the grid. If ` undefined ` the width will be calculated automatically (optional) .
257
304
258
305
## Touch devices support
259
306
0 commit comments