Add additional fallback for Map.js if getDimensions doesn't work. I think this is essentially a 'special case' for our testing process, but it fixes it for this case.

git-svn-id: http://svn.openlayers.org/trunk/openlayers@652 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2006-06-21 15:04:59 +00:00
parent abb950a7c3
commit 9b9a902ec0
2 changed files with 5 additions and 1 deletions

View File

@@ -275,6 +275,10 @@ OpenLayers.Map.prototype = {
this.size.w = dim.width; this.size.w = dim.width;
this.size.h = dim.height; this.size.h = dim.height;
} }
if (this.size.w == 0 && this.size.h == 0) {
this.size.w = parseInt(this.div.style.width);
this.size.h = parseInt(this.div.style.height);
}
}, },
/** /**
* @return {OpenLayers.LonLat} * @return {OpenLayers.LonLat}

View File

@@ -64,6 +64,6 @@
</script> </script>
</head> </head>
<body> <body>
<div id="map" style="width:500px;height:550px"></div> <div id="map" style="width:500px;height:550px;display:none"></div>
</body> </body>
</html> </html>