mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-27 00:25:06 +02:00
style: some whitespaces, line-breaks...
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
* Licensed under the MIT licenses.
|
||||
*/
|
||||
|
||||
;(function($, window, document, undefined){
|
||||
;(function($, window, document, undefined) {
|
||||
|
||||
var defaults = {
|
||||
items: 'li',
|
||||
@@ -19,9 +19,9 @@
|
||||
container_width: 0, // 0 == auto
|
||||
move_element: true,
|
||||
helper: false // or 'clone'
|
||||
// drag: function(e){},
|
||||
// start : function(e, ui){},
|
||||
// stop : function(e){}
|
||||
// drag: function(e) {},
|
||||
// start : function(e, ui) {},
|
||||
// stop : function(e) {}
|
||||
};
|
||||
|
||||
var $window = $(window);
|
||||
@@ -130,7 +130,7 @@
|
||||
if (this.options.limit) {
|
||||
if (left > this.player_max_left) {
|
||||
left = this.player_max_left;
|
||||
}else if(left < this.player_min_left) {
|
||||
} else if(left < this.player_min_left) {
|
||||
left = this.player_min_left;
|
||||
}
|
||||
}
|
||||
@@ -216,7 +216,7 @@
|
||||
this.mouse_init_pos = this.get_mouse_pos(e);
|
||||
this.offsetY = this.mouse_init_pos.top - this.el_init_pos.top;
|
||||
|
||||
this.$body.on(pointer_events.move, function(mme){
|
||||
this.$body.on(pointer_events.move, function(mme) {
|
||||
var mouse_actual_pos = self.get_mouse_pos(mme);
|
||||
var diff_x = Math.abs(
|
||||
mouse_actual_pos.left - self.mouse_init_pos.left);
|
||||
@@ -260,9 +260,10 @@
|
||||
this.$helper = this.$player.clone()
|
||||
.appendTo(this.$container).addClass('helper');
|
||||
this.helper = true;
|
||||
}else{
|
||||
} else {
|
||||
this.helper = false;
|
||||
}
|
||||
|
||||
this.scrollOffset = 0;
|
||||
this.el_init_offset = this.$player.offset();
|
||||
this.player_width = this.$player.width();
|
||||
@@ -337,8 +338,7 @@
|
||||
this.disabled = true;
|
||||
};
|
||||
|
||||
|
||||
fn.destroy = function(){
|
||||
fn.destroy = function() {
|
||||
this.disable();
|
||||
|
||||
this.$container.off('.gridster-draggable');
|
||||
|
||||
@@ -112,7 +112,8 @@
|
||||
this.$wrapper.addClass('ready');
|
||||
this.draggable();
|
||||
|
||||
$(window).bind('resize.gridster', throttle($.proxy(this.recalculate_faux_grid, this), 200));
|
||||
$(window).bind('resize.gridster', throttle(
|
||||
$.proxy(this.recalculate_faux_grid, this), 200));
|
||||
};
|
||||
|
||||
|
||||
@@ -692,10 +693,9 @@
|
||||
*
|
||||
* @method on_start_drag
|
||||
* @param {Event} event The original browser event
|
||||
* @param {Object} ui A prepared ui object.
|
||||
* @param {Object} ui A prepared ui object with useful drag-related data
|
||||
*/
|
||||
fn.on_start_drag = function(event, ui) {
|
||||
|
||||
this.$helper.add(this.$player).add(this.$wrapper).addClass('dragging');
|
||||
|
||||
this.$player.addClass('player');
|
||||
@@ -717,7 +717,6 @@
|
||||
this.last_cols = [];
|
||||
this.last_rows = [];
|
||||
|
||||
|
||||
// see jquery.collision.js
|
||||
this.collision_api = this.$helper.collision(
|
||||
colliders, this.options.collision);
|
||||
@@ -743,7 +742,7 @@
|
||||
*
|
||||
* @method on_drag
|
||||
* @param {Event} event The original browser event
|
||||
* @param {Object} ui A prepared ui object.
|
||||
* @param {Object} ui A prepared ui object with useful drag-related data
|
||||
*/
|
||||
fn.on_drag = function(event, ui) {
|
||||
//break if dragstop has been fired
|
||||
@@ -786,7 +785,7 @@
|
||||
*
|
||||
* @method on_stop_drag
|
||||
* @param {Event} event The original browser event
|
||||
* @param {Object} ui A prepared ui object.
|
||||
* @param {Object} ui A prepared ui object with useful drag-related data
|
||||
*/
|
||||
fn.on_stop_drag = function(event, ui) {
|
||||
this.$helper.add(this.$player).add(this.$wrapper)
|
||||
@@ -794,7 +793,8 @@
|
||||
|
||||
ui.position.left = ui.position.left + this.baseX;
|
||||
ui.position.top = ui.position.top + this.baseY;
|
||||
this.colliders_data = this.collision_api.get_closest_colliders(ui.position);
|
||||
this.colliders_data = this.collision_api.get_closest_colliders(
|
||||
ui.position);
|
||||
|
||||
this.on_overlapped_column_change(
|
||||
this.on_start_overlapping_column,
|
||||
@@ -1347,8 +1347,9 @@
|
||||
}, this));
|
||||
}
|
||||
|
||||
var $widgets_under_ph = this.get_widgets_under_player(
|
||||
this.cells_occupied_by_placeholder);
|
||||
|
||||
var $widgets_under_ph = this.get_widgets_under_player(this.cells_occupied_by_placeholder);
|
||||
if ($widgets_under_ph.length) {
|
||||
$widgets_under_ph.each($.proxy(function(i, widget) {
|
||||
var $w = $(widget);
|
||||
|
||||
Reference in New Issue
Block a user