From 8c8a4ae4b133881683f28c5b4e6d975e642fd0c5 Mon Sep 17 00:00:00 2001 From: Bilal Hanif Date: Thu, 16 Jun 2016 14:40:33 +0500 Subject: [PATCH 1/2] Fix for willItFit function in case of grid height = 1 --- dist/gridstack.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dist/gridstack.js b/dist/gridstack.js index bbf077a..f4491d1 100644 --- a/dist/gridstack.js +++ b/dist/gridstack.js @@ -398,6 +398,11 @@ this.float, 0, _.map(this.nodes, function(n) { return $.extend({}, n); })); + + if (this.height == 1 && !this.isAreaEmpty(node.x, node.y, node.width, node.height)){ + return false; + } + clone.addNode(node); return clone.getGridHeight() <= this.height; }; From cdeb6b0599d72acd6486650ea7dabd46e994813a Mon Sep 17 00:00:00 2001 From: Bilal Hanif Date: Thu, 16 Jun 2016 14:40:33 +0500 Subject: [PATCH 2/2] Fix for willItFit function in case of grid height = 1 --- dist/gridstack.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dist/gridstack.js b/dist/gridstack.js index bbf077a..f4491d1 100644 --- a/dist/gridstack.js +++ b/dist/gridstack.js @@ -398,6 +398,11 @@ this.float, 0, _.map(this.nodes, function(n) { return $.extend({}, n); })); + + if (this.height == 1 && !this.isAreaEmpty(node.x, node.y, node.width, node.height)){ + return false; + } + clone.addNode(node); return clone.getGridHeight() <= this.height; };