From 1ac16835f299379282eef6a5193e8432f1df11d0 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Thu, 14 Feb 2013 14:27:00 -0700 Subject: [PATCH] If we are getting flipped top/bottom, let's correct it at the source --- lib/OpenLayers/Control/ZoomBox.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/OpenLayers/Control/ZoomBox.js b/lib/OpenLayers/Control/ZoomBox.js index 217a90a434..68fd1c3d34 100644 --- a/lib/OpenLayers/Control/ZoomBox.js +++ b/lib/OpenLayers/Control/ZoomBox.js @@ -83,8 +83,8 @@ OpenLayers.Control.ZoomBox = OpenLayers.Class(OpenLayers.Control, { bounds = new OpenLayers.Bounds(minXY.lon, minXY.lat, maxXY.lon, maxXY.lat); } else { - var pixWidth = Math.abs(position.right-position.left); - var pixHeight = Math.abs(position.top-position.bottom); + var pixWidth = position.right - position.left; + var pixHeight = position.bottom - position.top; var zoomFactor = Math.min((this.map.size.h / pixHeight), (this.map.size.w / pixWidth)); var extent = this.map.getExtent();