[OpenLayers-Commits] r2306 - trunk/openlayers/lib/OpenLayers
commits at openlayers.org
commits at openlayers.org
Mon Mar 5 07:39:30 EST 2007
Author: sderle
Date: 2007-03-05 07:39:18 -0500 (Mon, 05 Mar 2007)
New Revision: 2306
Modified:
trunk/openlayers/lib/OpenLayers/Map.js
Log:
Applied patch for #514 to fix map.getCurrentSize() in Safari.
Modified: trunk/openlayers/lib/OpenLayers/Map.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Map.js 2007-03-05 10:41:34 UTC (rev 2305)
+++ trunk/openlayers/lib/OpenLayers/Map.js 2007-03-05 12:39:18 UTC (rev 2306)
@@ -628,12 +628,12 @@
this.div.clientHeight);
// Workaround for the fact that hidden elements return 0 for size.
- if (size.w == 0 && size.h == 0) {
+ if (size.w == 0 && size.h == 0 || isNaN(size.w) && isNaN(size.h)) {
var dim = OpenLayers.Element.getDimensions(this.div);
size.w = dim.width;
size.h = dim.height;
}
- if (size.w == 0 && size.h == 0) {
+ if (size.w == 0 && size.h == 0 || isNaN(size.w) && isNaN(size.h)) {
size.w = parseInt(this.div.style.width);
size.h = parseInt(this.div.style.height);
}
More information about the Commits
mailing list