mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
updated docs and diet
This commit is contained in:
@@ -299,8 +299,8 @@
|
||||
}
|
||||
|
||||
if (valid_pos.length) {
|
||||
var next_position = this.sort_by_row_asc(valid_pos);
|
||||
next_position = this.sort_by_row_asc(next_position)[0];
|
||||
var next_position = this.sort_by_row_desc(valid_pos);
|
||||
next_position = this.sort_by_col_asc(next_position)[0];
|
||||
return next_position;
|
||||
}
|
||||
return false;
|
||||
@@ -467,16 +467,19 @@
|
||||
$(ui.helper) : self.$player;
|
||||
|
||||
self.on_start_drag.call(self, event, ui);
|
||||
self.$el.trigger('gridster:dragstart');
|
||||
},
|
||||
stop: function(event, ui) {
|
||||
self.on_stop_drag.call(self, ui);
|
||||
self.$el.trigger('gridster:dragstop');
|
||||
},
|
||||
drag: throttle(function(event, ui) {
|
||||
self.on_drag.call(self, event, ui);
|
||||
self.$el.trigger('gridster:drag');
|
||||
}, 100, true)
|
||||
});
|
||||
|
||||
this.$widgets.draggable(draggable_options);
|
||||
this.$widgets.draggable(draggable_options);
|
||||
|
||||
return this;
|
||||
};
|
||||
@@ -932,7 +935,8 @@
|
||||
* @return {Boolean} Returns true or false.
|
||||
*/
|
||||
fn.is_placeholder_in_col = function(col) {
|
||||
return $.inArray(col, this.cells_occupied_by_placeholder.cols) >= 0;
|
||||
var c = this.cells_occupied_by_placeholder || [];
|
||||
return $.inArray(col, c.cols) >= 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -1681,12 +1685,11 @@
|
||||
col: col,
|
||||
row: row
|
||||
};
|
||||
var cells_occupied_by_w = this.get_cells_occupied(widget_grid_data);
|
||||
var result = true;
|
||||
|
||||
this.for_each_cell_occupied(future_wd, function(tcol, trow){
|
||||
var $tw = this.is_widget(tcol, trow);
|
||||
if ($tw && !$tw.is($w)) {
|
||||
if ($tw && (!widget_grid_data.el || $tw.is($w))) {
|
||||
result = false;
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user