fixed bounds checking cc @rochoa

This commit is contained in:
javi 2014-09-24 12:07:38 +02:00
parent b5d0ef5550
commit 63858fb051

View File

@ -343,7 +343,7 @@ L.TorqueLayer = L.CanvasLayer.extend({
pos = this.getTilePos(tile.coord); pos = this.getTilePos(tile.coord);
xx = x - pos.x; xx = x - pos.x;
yy = y - pos.y; yy = y - pos.y;
if (xx >= 0 && yy >= 0 && xx <= 256 && yy <= 256) { if (xx >= 0 && yy >= 0 && xx < this.renderer.TILE_SIZE && yy <= this.renderer.TILE_SIZE) {
value = this.renderer.getValueFor(tile, step, xx, yy); value = this.renderer.getValueFor(tile, step, xx, yy);
} }
if (value !== null) { if (value !== null) {