Fixes grid height not updated when added new item using cellHeight = 'auto'

This commit is contained in:
Tom Cleven 2016-06-02 14:13:45 +02:00 committed by Tom Cleven
commit e5d8c7bb39

View file

@ -1488,8 +1488,8 @@
};
GridStack.prototype.cellWidth = function() {
var o = this.container.children('.' + this.opts.itemClass).first();
return Math.ceil(o.outerWidth() / parseInt(o.attr('data-gs-width'), 10));
var o = $(this.container);
return Math.ceil(o.outerWidth() / o.attr('data-gs-width'));
};
GridStack.prototype.getCellFromPixel = function(position, useOffset) {