-
Notifications
You must be signed in to change notification settings - Fork 392
Open
Labels
Description
source code line 401.
console.log("realRows:",maxHeight,'maxRows:',this.maxRows);
this.gridHeight = Math.min(this.maxRows, maxHeight);
You set gridHeight with the 'min' math function,then,when you set the 'maxRows:1' in your 'gridsterOptions' ,the 'gridHeight' may always be 1.
source code line 544.
var updateHeight = function() {
$elem.css('height', (gridster.gridHeight * gridster.curRowHeight) + gridster.margins[0] + 'px');
$elem.css('height', (gridster.gridHeight * gridster.curRowHeight) + (gridster.outerMargin ? gridster.margins[0] : -gridster.margins[0]) + 'px');
};
here,the $elem's width may always be 'curRowHeight + margins'.
So I changed the line 401 code to:
this.gridHeight = this.maxRows - maxHeight > 0 ? Math.min(this.maxRows, maxHeight) : Math.max(this.maxRows, maxHeight);