From 4a9b87bdbb8c9babeece29f894524bfdb465d228 Mon Sep 17 00:00:00 2001 From: Charlie Moad Date: Wed, 27 Jun 2012 21:18:02 -0400 Subject: [PATCH] use abs val distance --- src/map/Map.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/map/Map.js b/src/map/Map.js index a87b184b..e6d39674 100644 --- a/src/map/Map.js +++ b/src/map/Map.js @@ -286,7 +286,7 @@ L.Map = L.Class.extend({ zoom++; nePoint = this.project(ne, zoom); swPoint = this.project(sw, zoom); - boundsSize = new L.Point(nePoint.x - swPoint.x, swPoint.y - nePoint.y); + boundsSize = new L.Point(Math.abs(nePoint.x - swPoint.x), Math.abs(swPoint.y - nePoint.y)); if (!inside) { zoomNotFound = boundsSize.x <= size.x && boundsSize.y <= size.y;