This commit is contained in:
Pavel Reznikov 2015-02-27 15:57:43 -08:00
commit a716b24fb4
2 changed files with 8 additions and 1 deletions

View file

@ -68,6 +68,8 @@
content: "\f065";
}
.grid-stack-item { min-width: 8.33333333% }
.grid-stack-item[data-gs-width="12"] { width: 100% }
.grid-stack-item[data-gs-width="11"] { width: 91.66666667% }
.grid-stack-item[data-gs-width="10"] { width: 83.33333333% }

View file

@ -440,6 +440,8 @@
};
GridStack.prototype._update_styles = function (max_height) {
var prefix = '.' + this.opts._class + ' .' + this.opts.item_class;
if (typeof max_height == 'undefined') {
max_height = this._styles._max;
this._styles._max = 0;
@ -454,9 +456,12 @@
this._update_container_height();
}
if (this._styles._max == 0) {
Utils.insert_css_rule(this._styles, prefix, 'min-height: ' + (this.opts.cell_height) + 'px;', 0);
}
if (max_height > this._styles._max) {
for (var i = this._styles._max; i < max_height; ++i) {
var prefix = '.' + this.opts._class + ' .' + this.opts.item_class;
Utils.insert_css_rule(this._styles,
prefix + '[data-gs-height="' + (i + 1) + '"]',
'height: ' + (this.opts.cell_height * (i + 1) + this.opts.vertical_margin * i) + 'px;',