now don't use getDimensions any more, but use offsetWidth and offsetHeight before like getDimension does if style.display is not none. r=elemoine,quietriver (pullup #2414)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10278 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -1402,11 +1402,9 @@ OpenLayers.Map = OpenLayers.Class({
|
||||
var size = new OpenLayers.Size(this.div.clientWidth,
|
||||
this.div.clientHeight);
|
||||
|
||||
// Workaround for the fact that hidden elements return 0 for size.
|
||||
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;
|
||||
size.w = this.div.offsetWidth;
|
||||
size.h = this.div.offsetHeight;
|
||||
}
|
||||
if (size.w == 0 && size.h == 0 || isNaN(size.w) && isNaN(size.h)) {
|
||||
size.w = parseInt(this.div.style.width);
|
||||
|
||||
Reference in New Issue
Block a user