fix(gridster): wrong addition solved in add_faux_rows/cols by adding parseInt

Closes #426, #425
This commit is contained in:
Stijn Verrept
2015-04-16 20:26:18 +02:00
committed by Javi Sánchez-Marín
parent d3f25f3fbb
commit d947175257
+2 -2
View File
@@ -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++) {