use abs val distance

This commit is contained in:
Charlie Moad 2012-06-27 21:18:02 -04:00
parent 0830bb38dc
commit 4a9b87bdbb

View File

@ -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;