Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 65e0439

Browse files
authored
Merge branch 'develop' into 776_dist_remove
2 parents 83dc57d + ff31cb7 commit 65e0439

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/gridstack.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,9 +1033,13 @@
10331033
return;
10341034
}
10351035
var height = this.grid.getGridHeight();
1036-
var minHeight = parseInt(this.container.css('min-height')) / this.cellHeight();
1037-
if (height < minHeight) {
1038-
height = minHeight;
1036+
// check for css min height. Each row is cellHeight + verticalMargin, until last one which has no margin below
1037+
var cssMinHeight = parseInt(this.container.css('min-height'));
1038+
if (cssMinHeight > 0) {
1039+
var minHeight = (cssMinHeight + this.opts.verticalMargin) / (this.cellHeight() + this.opts.verticalMargin);
1040+
if (height < minHeight) {
1041+
height = minHeight;
1042+
}
10391043
}
10401044
this.container.attr('data-gs-current-height', height);
10411045
if (!this.opts.cellHeight) {

0 commit comments

Comments
 (0)