Fixing Util.getRenderedDimensions so it assigns units to positional values. Thanks Wally for the report. r=euzuro (closes #1570)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@7329 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -1365,7 +1365,7 @@ OpenLayers.Util.getBrowserName = function() {
|
||||
*/
|
||||
OpenLayers.Util.getRenderedDimensions = function(contentHTML, size) {
|
||||
|
||||
var w = h = null;
|
||||
var w, h;
|
||||
|
||||
// create temp container div with restricted size
|
||||
var container = document.createElement("div");
|
||||
@@ -1376,9 +1376,11 @@ OpenLayers.Util.getRenderedDimensions = function(contentHTML, size) {
|
||||
//fix a dimension, if specified.
|
||||
if (size) {
|
||||
if (size.w) {
|
||||
w = container.style.width = size.w;
|
||||
w = size.w;
|
||||
container.style.width = w + "px";
|
||||
} else if (size.h) {
|
||||
h = container.style.height = size.h;
|
||||
h = size.h
|
||||
container.style.height = h + "px";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user