Permalink
Browse files

Fix JSHint issues

  • Loading branch information...
1 parent 61ee0be commit 1d64f1ecbbccc9ee4f8b0f9e955f69a230d3ec6a @joelfillmore joelfillmore committed Dec 3, 2012
Showing with 10 additions and 14 deletions.
  1. +3 −5 src/Grid.js
  2. +3 −3 src/Template.js
  3. +4 −4 src/Tile.js
  4. +0 −2 src/UniformTemplates.js
View
@@ -1,4 +1,4 @@
-(function() {
+(function($) {
var Grid = Tiles.Grid = function(element) {
@@ -171,10 +171,8 @@
prevTileIds.push(this.tiles[i].id);
}
- var tileIds = prepend
- ? newTileIds.concat(prevTileIds)
+ var tileIds = prepend ? newTileIds.concat(prevTileIds)
: prevTileIds.concat(newTileIds);
-
this.updateTiles(tileIds);
};
@@ -373,4 +371,4 @@
}
};
-})();
+})(jQuery);
View
@@ -23,7 +23,7 @@
];
*/
-(function() {
+(function($) {
// remove whitespace and create 2d array
var parseCells = function(rows) {
@@ -113,7 +113,7 @@
}
// add the rect
- rects.push(new Rectangle(x, y, width, height))
+ rects.push(new Rectangle(x, y, width, height));
}
}
@@ -214,4 +214,4 @@
// period used to designate a single 1x1 cell tile
Tiles.Template.SINGLE_CELL = '.';
-})();
+})(jQuery);
View
@@ -2,7 +2,7 @@
// single namespace export
var Tiles = {};
-(function() {
+(function($) {
var Tile = Tiles.Tile = function(tileId, element) {
@@ -79,11 +79,11 @@ var Tiles = {};
var tile = this,
validateChangesAndComplete = function() {
var el = tile.$el[0];
- if (tile.left != el.offsetLeft) {
+ if (tile.left !== el.offsetLeft) {
//console.log ('mismatch left:' + tile.left + ' actual:' + el.offsetLeft + ' id:' + tile.id);
tile.$el.css('left', tile.left);
}
- if (tile.top != el.offsetTop) {
+ if (tile.top !== el.offsetTop) {
//console.log ('mismatch top:' + tile.top + ' actual:' + el.offsetTop + ' id:' + tile.id);
tile.$el.css('top', tile.top);
}
@@ -113,4 +113,4 @@ var Tiles = {};
}
};
-})();
+})(jQuery);
View
@@ -15,6 +15,4 @@ Tiles.UniformTemplates = {
return new Tiles.Template(rects, numCols, numRows);
}
-
-
};

0 comments on commit 1d64f1e

Please sign in to comment.