File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 9
9
},
10
10
"scripts" : {
11
11
"build" : " grunt ; doctoc ./README.md ; doctoc ./doc/README.md ; doctoc ./doc/CHANGES.md" ,
12
- "test" : " grunt lint && karma start karma.conf.js"
12
+ "test" : " grunt lint && karma start karma.conf.js" ,
13
+ "lint" : " grunt lint"
13
14
},
14
15
"keywords" : [
15
16
" gridstack" ,
Original file line number Diff line number Diff line change 1033
1033
return ;
1034
1034
}
1035
1035
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
+ }
1039
1043
}
1040
1044
this . container . attr ( 'data-gs-current-height' , height ) ;
1041
1045
if ( ! this . opts . cellHeight ) {
You can’t perform that action at this time.
0 commit comments