From 63858fb0516ff4323e92a177b1a612fa01f9e56b Mon Sep 17 00:00:00 2001 From: javi Date: Wed, 24 Sep 2014 12:07:38 +0200 Subject: [PATCH] fixed bounds checking cc @rochoa --- lib/torque/leaflet/torque.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/torque/leaflet/torque.js b/lib/torque/leaflet/torque.js index 1439e16..23310ff 100644 --- a/lib/torque/leaflet/torque.js +++ b/lib/torque/leaflet/torque.js @@ -343,7 +343,7 @@ L.TorqueLayer = L.CanvasLayer.extend({ pos = this.getTilePos(tile.coord); xx = x - pos.x; 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); } if (value !== null) {