diff --git a/src/maps.js b/src/maps.js index fa6bf107..08c964d9 100644 --- a/src/maps.js +++ b/src/maps.js @@ -91,6 +91,7 @@ WorldMap.prototype.refresh = function () { }; WorldMap.prototype.wrapTile = function (n) { + // currently unused var max = Math.pow(2, this.zoom); return n < 0 ? max - n : n % max; }; @@ -179,7 +180,7 @@ WorldMap.prototype.render = function () { ctx = this.canvas.getContext('2d'); for (x = 0; x < tileGrid.x; x += 1) { for (y = 0; y < tileGrid.y; y += 1) { - tileX = this.wrapTile(originTile.x + x); + tileX = originTile.x + x; tileY = originTile.y + y; if ((tileX >= 0 && tileX < max) && (tileY >= 0 && tileY < max)) { img = new Image();