mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-28 00:24:21 +02:00
fix(gridster): wrong addition solved in add_faux_rows/cols by adding parseInt
Closes #426, #425
This commit is contained in:
committed by
Javi Sánchez-Marín
parent
d3f25f3fbb
commit
d947175257
@@ -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++) {
|
||||
|
||||
Reference in New Issue
Block a user