mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-27 00:25:06 +02:00
Fix the memory leak that was incorrectly iterating rows and columns
This commit is contained in:
Vendored
+11
-2
@@ -63,8 +63,13 @@
|
||||
|
||||
var d = this.data;
|
||||
|
||||
typeof d.left === 'undefined' && (d.left = d.x1);
|
||||
typeof d.top === 'undefined' && (d.top = d.y1);
|
||||
if ( d.left === undefined ) {
|
||||
d.left = d.x1;
|
||||
}
|
||||
|
||||
if ( d.top === undefined ) {
|
||||
d.top = d.y1;
|
||||
}
|
||||
|
||||
this.coords.x1 = d.left;
|
||||
this.coords.y1 = d.top;
|
||||
@@ -3808,6 +3813,8 @@
|
||||
* @return {Object} Returns the instance of the Gridster class.
|
||||
*/
|
||||
fn.add_faux_rows = function(rows) {
|
||||
rows = window.parseInt( rows, 10 );
|
||||
|
||||
var actual_rows = this.rows;
|
||||
var max_rows = actual_rows + (rows || 1);
|
||||
|
||||
@@ -3834,6 +3841,8 @@
|
||||
* @return {Object} Returns the instance of the Gridster class.
|
||||
*/
|
||||
fn.add_faux_cols = function(cols) {
|
||||
cols = window.parseInt( cols, 10 );
|
||||
|
||||
var actual_cols = this.cols;
|
||||
var max_cols = actual_cols + (cols || 1);
|
||||
max_cols = Math.min(max_cols, this.options.max_cols);
|
||||
|
||||
Vendored
+2
-2
File diff suppressed because one or more lines are too long
Vendored
+11
-2
@@ -63,8 +63,13 @@
|
||||
|
||||
var d = this.data;
|
||||
|
||||
typeof d.left === 'undefined' && (d.left = d.x1);
|
||||
typeof d.top === 'undefined' && (d.top = d.y1);
|
||||
if ( d.left === undefined ) {
|
||||
d.left = d.x1;
|
||||
}
|
||||
|
||||
if ( d.top === undefined ) {
|
||||
d.top = d.y1;
|
||||
}
|
||||
|
||||
this.coords.x1 = d.left;
|
||||
this.coords.y1 = d.top;
|
||||
@@ -3808,6 +3813,8 @@
|
||||
* @return {Object} Returns the instance of the Gridster class.
|
||||
*/
|
||||
fn.add_faux_rows = function(rows) {
|
||||
rows = window.parseInt( rows, 10 );
|
||||
|
||||
var actual_rows = this.rows;
|
||||
var max_rows = actual_rows + (rows || 1);
|
||||
|
||||
@@ -3834,6 +3841,8 @@
|
||||
* @return {Object} Returns the instance of the Gridster class.
|
||||
*/
|
||||
fn.add_faux_cols = function(cols) {
|
||||
cols = window.parseInt( cols, 10 );
|
||||
|
||||
var actual_cols = this.cols;
|
||||
var max_cols = actual_cols + (cols || 1);
|
||||
max_cols = Math.min(max_cols, this.options.max_cols);
|
||||
|
||||
+2
-2
File diff suppressed because one or more lines are too long
@@ -67,8 +67,13 @@
|
||||
|
||||
var d = this.data;
|
||||
|
||||
typeof d.left === 'undefined' && (d.left = d.x1);
|
||||
typeof d.top === 'undefined' && (d.top = d.y1);
|
||||
if ( d.left === undefined ) {
|
||||
d.left = d.x1;
|
||||
}
|
||||
|
||||
if ( d.top === undefined ) {
|
||||
d.top = d.y1;
|
||||
}
|
||||
|
||||
this.coords.x1 = d.left;
|
||||
this.coords.y1 = d.top;
|
||||
|
||||
@@ -2961,6 +2961,8 @@
|
||||
* @return {Object} Returns the instance of the Gridster class.
|
||||
*/
|
||||
fn.add_faux_rows = function(rows) {
|
||||
rows = window.parseInt( rows, 10 );
|
||||
|
||||
var actual_rows = this.rows;
|
||||
var max_rows = actual_rows + (rows || 1);
|
||||
|
||||
@@ -2987,6 +2989,8 @@
|
||||
* @return {Object} Returns the instance of the Gridster class.
|
||||
*/
|
||||
fn.add_faux_cols = function(cols) {
|
||||
cols = window.parseInt( cols, 10 );
|
||||
|
||||
var actual_cols = this.cols;
|
||||
var max_cols = actual_cols + (cols || 1);
|
||||
max_cols = Math.min(max_cols, this.options.max_cols);
|
||||
|
||||
Reference in New Issue
Block a user