From a2237ec7a887f827fdde51ea1ff6e309f48f4a07 Mon Sep 17 00:00:00 2001 From: jmoenig Date: Fri, 24 May 2019 14:49:39 +0200 Subject: [PATCH] oops, didn't intend to commit this :-) --- src/maps.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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();