From d947175257d686801154a403016fd2ec7e6d40c2 Mon Sep 17 00:00:00 2001 From: Stijn Verrept Date: Mon, 8 Sep 2014 16:45:46 +0200 Subject: [PATCH] fix(gridster): wrong addition solved in add_faux_rows/cols by adding parseInt Closes #426, #425 --- src/jquery.gridster.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/jquery.gridster.js b/src/jquery.gridster.js index c9d5ea82d..566cc3dbf 100755 --- a/src/jquery.gridster.js +++ b/src/jquery.gridster.js @@ -2963,7 +2963,7 @@ */ fn.add_faux_rows = function(rows) { var actual_rows = this.rows; - var max_rows = actual_rows + (rows || 1); + var max_rows = actual_rows + parseInt(rows || 1, 10); for (var r = max_rows; r > actual_rows; r--) { for (var c = this.cols; c >= 1; c--) { @@ -2989,7 +2989,7 @@ */ fn.add_faux_cols = function(cols) { var actual_cols = this.cols; - var max_cols = actual_cols + (cols || 1); + var max_cols = actual_cols + parseInt(cols || 1, 10); max_cols = Math.min(max_cols, this.options.max_cols); for (var c = actual_cols + 1; c <= max_cols; c++) {