Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
},
"scripts": {
"build": "grunt ; doctoc ./README.md ; doctoc ./doc/README.md ; doctoc ./doc/CHANGES.md",
"test": "grunt lint && karma start karma.conf.js"
"test": "grunt lint && karma start karma.conf.js",
"lint": "grunt lint"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added an explicit lint (makes it easier to check before commit) as for some reason it's not auto linting in Visual Studio code yet...

},
"keywords": [
"gridstack",
Expand Down
10 changes: 7 additions & 3 deletions src/gridstack.js
Original file line number Diff line number Diff line change
Expand Up @@ -1033,9 +1033,13 @@
return;
}
var height = this.grid.getGridHeight();
var minHeight = parseInt(this.container.css('min-height')) / this.cellHeight();
if (height < minHeight) {
height = minHeight;
// check for css min height. Each row is cellHeight + verticalMargin, until last one which has no margin below
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

real change - ignore the /dist files as they will be removed yet (merge hell)

var cssMinHeight = parseInt(this.container.css('min-height'));
if (cssMinHeight > 0) {
var minHeight = (cssMinHeight + this.opts.verticalMargin) / (this.cellHeight() + this.opts.verticalMargin);
if (height < minHeight) {
height = minHeight;
}
}
this.container.attr('data-gs-current-height', height);
if (!this.opts.cellHeight) {
Expand Down