element.getDimensions doesn't check styles of parent elements, so when an element is hideen because of a parent, this breaks. fall back to style.width/height in cases where we have a 0,0 size.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@118 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -172,9 +172,8 @@ OpenLayers.Map.prototype = {
|
||||
|
||||
// Workaround for the fact that hidden elements return 0 for size.
|
||||
if (size.w == 0 && size.h == 0) {
|
||||
var elementSize = Element.getDimensions(this.div);
|
||||
size.w = elementSize.width;
|
||||
size.h = elementSize.height;
|
||||
size.w = parseInt(this.div.style.width);
|
||||
size.h = parseInt(this.div.style.height);
|
||||
}
|
||||
return size;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user