From a5ef8427273d9db045ac7f139ca545d78a33123b Mon Sep 17 00:00:00 2001 From: Pavel Reznikov Date: Tue, 11 Nov 2014 19:05:45 -0800 Subject: [PATCH] update container height after add/remove --- gridstack.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gridstack.js b/gridstack.js index 28890e4..8bb3eb1 100644 --- a/gridstack.js +++ b/gridstack.js @@ -283,12 +283,14 @@ if (typeof height != 'undefined') el.attr('data-gs-height', height); this.container.append(el); this._prepare_element(el); + this._update_container_height(); }; GridStack.prototype.remove_widget = function (el) { var node = $(el).data('_gridstack_node'); this.grid.remove_node(node); el.remove(); + this._update_container_height(); }; scope.GridStackUI = GridStack;