[OpenLayers-Commits] r3107 - trunk/openlayers/lib/OpenLayers/Control

commits at openlayers.org commits at openlayers.org
Tue May 1 11:21:24 EDT 2007


Author: tschaub
Date: 2007-05-01 11:21:18 -0400 (Tue, 01 May 2007)
New Revision: 3107

Modified:
   trunk/openlayers/lib/OpenLayers/Control/OverviewMap.js
Log:
#690 - force overview map extent rectangle to have non-negative dimensions - thanks openlayers

Modified: trunk/openlayers/lib/OpenLayers/Control/OverviewMap.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Control/OverviewMap.js	2007-05-01 14:21:21 UTC (rev 3106)
+++ trunk/openlayers/lib/OpenLayers/Control/OverviewMap.js	2007-05-01 15:21:18 UTC (rev 3107)
@@ -520,8 +520,8 @@
                              this.ovmap.size.w - this.wComp);
         this.extentRectangle.style.top = parseInt(top) + 'px';
         this.extentRectangle.style.left = parseInt(left) + 'px';
-        this.extentRectangle.style.height = parseInt(bottom - top)+ 'px';
-        this.extentRectangle.style.width = parseInt(right - left) + 'px';
+        this.extentRectangle.style.height = parseInt(Math.max(bottom - top, 0))+ 'px';
+        this.extentRectangle.style.width = parseInt(Math.max(right - left, 0)) + 'px';
     },
 
     /**



More information about the Commits mailing list