mark Element.getDimensions as deprecated and remove the workaround in Map.getCurrentSize. p=bbinet, r=me (closes #2414)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@10125 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Frédéric Junod
2010-03-19 12:38:29 +00:00
parent 223547e227
commit 27234b07ff
3 changed files with 3 additions and 38 deletions

View File

@@ -1403,12 +1403,6 @@ 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;
}
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);