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.
|
// 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) {
|
||||||
var elementSize = Element.getDimensions(this.div);
|
size.w = parseInt(this.div.style.width);
|
||||||
size.w = elementSize.width;
|
size.h = parseInt(this.div.style.height);
|
||||||
size.h = elementSize.height;
|
|
||||||
}
|
}
|
||||||
return size;
|
return size;
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user