Skip to content

Commit 398dccb

Browse files
committed
Add default values for verticalMarginUnit and cellHeightUnit, update readme to have verticalMargin info, and several more unit tests.
1 parent 3d0c8ba commit 398dccb

File tree

6 files changed

+369
-6
lines changed

6 files changed

+369
-6
lines changed

dist/gridstack.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,9 @@
537537
disableResize: opts.disableResize || false,
538538
rtl: 'auto',
539539
removable: false,
540-
removeTimeout: 2000
540+
removeTimeout: 2000,
541+
verticalMarginUnit: 'px',
542+
cellHeightUnit: 'px'
541543
});
542544

543545
if (this.opts.rtl === 'auto') {

dist/gridstack.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/gridstack.min.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ gridstack.js API
4848
- [setGridWidth(gridWidth, doNotPropagate)](#setgridwidthgridwidth-donotpropagate)
4949
- [setStatic(staticValue)](#setstaticstaticvalue)
5050
- [update(el, x, y, width, height)](#updateel-x-y-width-height)
51+
- [verticalMargin(value, noUpdate)](#verticalmarginvalue-noupdate)
5152
- [willItFit(x, y, width, height, autoPosition)](#willitfitx-y-width-height-autoposition)
5253
- [Utils](#utils)
5354
- [GridStackUI.Utils.sort(nodes[, dir[, width]])](#gridstackuiutilssortnodes-dir-width)
@@ -438,6 +439,13 @@ Parameters:
438439

439440
Updates widget position/size.
440441

442+
### verticalMargin(value, noUpdate)
443+
444+
Parameters:
445+
446+
- `value` - new vertical margin value.
447+
- `noUpdate` - if true, styles will not be updated.
448+
441449
### willItFit(x, y, width, height, autoPosition)
442450

443451
Returns `true` if the `height` of the grid will be less the vertical constraint. Always returns `true` if grid doesn't

0 commit comments

Comments
 (0)