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
Copy file name to clipboardExpand all lines: doc/CHANGES.md
+4-3Lines changed: 4 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -33,9 +33,10 @@ Change log
33
33
34
34
## 1.0.0-dev (upcoming)
35
35
36
-
- fix [(1166)](https://github.com/gridstack/gridstack.js/issues/1166) resize not taking margin height into account
37
-
- fix [(1155)](https://github.com/gridstack/gridstack.js/issues/1155)`maxRow` now limit initial item placement if out of bound, preventing broken drag behavior
38
-
- fix [(1171)](https://github.com/gridstack/gridstack.js/issues/1171) added event support to call `grid.on('added removed change', callback)` again even with native events.
36
+
- add `minRow` and `row` grid options (which set minRow=maxRow=N) [1172](https://github.com/gridstack/gridstack.js/issues/1172) - thanks [@RadoiAndrei](https://github.com/RadoiAndrei)
37
+
- fix [1166](https://github.com/gridstack/gridstack.js/issues/1166) resize not taking margin height into account - thanks [@awjae](https://github.com/awjae)
38
+
- fix [1155](https://github.com/gridstack/gridstack.js/issues/1155)`maxRow` now limit initial item placement if out of bound, preventing broken drag behavior
39
+
- fix [1171](https://github.com/gridstack/gridstack.js/issues/1171) added event support to call `grid.on('added removed change', callback)` again even with native events.
Copy file name to clipboardExpand all lines: doc/README.md
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -75,7 +75,6 @@ gridstack.js API
75
75
* a string (ex: '100px', '10em', '10rem', '10%')
76
76
* 0 or null, in which case the library will not generate styles for rows. Everything must be defined in CSS files.
77
77
*`'auto'` - height will be calculated to match cell width (initial square grid).
78
-
-`row` - number of rows. This is a shortcut of writting `minRow: sameValue, maxRow: sameValue`.
79
78
-`column` - number of columns (default: `12`) which can change on the fly with `column(N)` as well. See [example](http://gridstackjs.com/demo/column.html)
80
79
-`ddPlugin` - class that implement drag'n'drop functionallity for gridstack. If `false` grid will be static. (default: `null` - first available plugin will be used)
81
80
-`disableDrag` - disallows dragging of widgets (default: `false`).
-`handleClass` - draggable handle class (e.g. `'grid-stack-item-content'`). If set `handle` is ignored (default: `null`)
89
88
-`itemClass` - widget class (default: `'grid-stack-item'`)
90
-
-`minRow` - minimum rows amount. Default is `0`
91
-
-`maxRow` - maximum rows amount. Default is `0`which means no maximum rows
89
+
-`maxRow` - maximum rows amount. Default is `0` which means no max.
90
+
-`minRow` - minimum rows amount. Default is `0`. You can also do this with `min-height` CSS attribute on the grid div in pixels, which will round to the closest row.
92
91
-`minWidth` - minimal width. If window width is less than or equal to, grid will be shown in one-column mode (default: `768`)
93
92
-`oneColumnModeDomSort` - set to `true` if you want oneColumnMode to use the DOM order and ignore x,y from normal multi column layouts during sorting. This enables you to have custom 1 column layout that differ from the rest. (default?: `false`)
94
93
-`placeholderClass` - class for placeholder (default: `'grid-stack-placeholder'`)
-`removable` - if `true` widgets could be removed by dragging outside of the grid. It could also be a jQuery selector string, in this case widgets will be removed by dropping them there (default: `false`) See [example](http://gridstackjs.com/demo/two.html)
98
97
-`removeTimeout` - time in milliseconds before widget is being removed while dragging outside of the grid. (default: `2000`)
98
+
-`row` - fix grid number of rows. This is a shortcut of writing `minRow:N, maxRow:N`. (default `0` no constrain)
99
99
-`rtl` - if `true` turns grid to RTL. Possible values are `true`, `false`, `'auto'` (default: `'auto'`) See [example](http://gridstackjs.com/demo/rtl.html)
100
100
-`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.
101
101
-`verticalMargin` - vertical gap size (default: `20`). Can be:
@@ -105,11 +105,11 @@ gridstack.js API
105
105
## Grid attributes
106
106
107
107
-`data-gs-animate` - turns animation on
108
-
-`data-gs-row` - number of rows. This is a shortcut of writting `data-gs-min-row="sameValue" data-gs-max-row="sameValue"` .
109
108
-`data-gs-column` - amount of columns. Setting non-default value must be supported by equivalent change in CSS, [see docs here](https://github.com/gridstack/gridstack.js#change-grid-columns).
110
-
-`data-gs-min-row` - minimum rows amount. Default is `0`.
111
-
-`data-gs-max-row` - maximum rows amount. Default is `0` which means no maximum rows.
112
-
-`data-gs-current-row` - current rows amount. Set by the library only. Can be used by the CSS rules.
109
+
-`data-gs-current-row` - (internal) current rows amount. Set by the library only. Can be used by the CSS rules.
110
+
-`data-gs-max-row` - maximum rows amount. Default is `0` which means no max.
111
+
-`data-gs-min-row` - minimum rows amount. Default is `0`. You can also do this with `min-height` CSS attribute on the grid div in pixels, which will round to the closest row.
112
+
-`data-gs-row` - fix grid number of rows. This is a shortcut of writing `data-gs-min-row="N" data-gs-max-row="N"`. (default `0` no constrain)
0 commit comments