jslinting

This commit is contained in:
vieron
2012-07-24 10:31:08 +02:00
parent 4eb679fb78
commit 443d0fbc29
4 changed files with 24 additions and 24 deletions

View File

@@ -46,10 +46,10 @@
var el = this.el;
if (el && !update) {
this.data = {} || el.offset();
this.data = el.offset();
this.data.width = el.width();
this.data.height = el.height();
};
}
if (el && update && !not_update_offsets) {
var offset = el.offset();

View File

@@ -55,7 +55,7 @@
this.player_min_left = 0 + this.options.offset_left;
this.init();
};
}
var fn = Draggable.prototype;
@@ -82,7 +82,7 @@
fn.drag_handler = function(e) {
if (e.which !== 1) {
return false;
};
}
var self = this;
var first = true;
@@ -108,7 +108,7 @@
if (self.is_dragging == true) {
throttle(self.on_dragmove.call(self, mme), 130);
};
}
return false;
@@ -136,7 +136,7 @@
this.options.start.call(this.$player, e, {
helper: this.helper ? this.$helper : this.$player
});
};
}
return false;
};
@@ -156,12 +156,12 @@
}else if(left < this.player_min_left) {
left = this.player_min_left;
}
};
}
return {
left: left,
top: top
}
};
};
@@ -198,7 +198,7 @@
'left': offset.left,
'top': offset.top
}
}
};
if (this.options.stop) {
this.options.stop.call(this.$player, e, ui);

View File

@@ -115,7 +115,7 @@
this.$wrapper.find('.player-revert').removeClass('player-revert');
this.drag_api.disable();
return this;
}
};
/**
@@ -127,7 +127,7 @@
fn.enable = function() {
this.drag_api.enable();
return this;
}
};
/**
@@ -229,7 +229,7 @@
if (callback) {
callback.apply(this, el);
};
}
}, this));
};
@@ -298,7 +298,7 @@
'data-sizex': wgd.size_x,
'data-sizey': wgd.size_y
});
};
}
// attach Coord object to player data-coord attribute
$el.data('coords', $el.coords());
@@ -469,7 +469,7 @@
var abs_offset = {
left: ui.position.left + this.baseX,
top: ui.position.top + this.baseY
}
};
this.colliders_data = this.collision_api.get_closest_colliders(
abs_offset);
@@ -741,7 +741,7 @@
* Sorts an Array of grid coords objects (representing the grid coords of
* each widget) placing first the empty cells upper left.
*
* @method sort_by_row_asc
* @method sort_by_row_and_col_asc
* @param {Array} widgets Array of grid coords objects
* @return {Array} Returns the array sorted.
*/
@@ -761,7 +761,7 @@
* Sorts an Array of grid coords objects by column (representing the grid
* coords of each widget) in ascending way.
*
* @method sort_by_row_asc
* @method sort_by_col_asc
* @param {Array} widgets Array of grid coords objects
* @return {Array} Returns the array sorted.
*/
@@ -1027,7 +1027,7 @@
var right_col = (col + phgd.size_x - 1);
if (right_col > this.cols) {
col = col - (right_col - col);
};
}
var moved_down = this.placeholder_grid_data.row < row;
var changed_column = this.placeholder_grid_data.col !== col;
@@ -1926,19 +1926,19 @@
$widgets = $widgets.add(
this.$widgets.filter(function() {
var tcol = $(this).attr('data-col');
return (tcol == col || tcol > col);
return (tcol === col || tcol > col);
})
);
};
}
if (row) {
$widgets = $widgets.add(
this.$widgets.filter(function() {
var trow = $(this).attr('data-row');
return (trow == row || trow > row);
return (trow === row || trow > row);
})
);
};
}
return $widgets;
}
@@ -1990,7 +1990,7 @@
// don't duplicate stylesheets for the same configuration
if ($.inArray(serialized_opts, Gridster.generated_stylesheets) >= 0) {
return false;
};
}
Gridster.generated_stylesheets.push(serialized_opts);

View File

@@ -1,4 +1,4 @@
(function(window, undefined) {
;(function(window, undefined) {
/* Debounce and throttle functions taken from underscore.js */
window.debounce = function(func, wait, immediate) {
var timeout;
@@ -38,4 +38,4 @@
};
};
})(window)
})(window);