Fix from gregers, patch cleaned up by Erik for, "Util.getRenderedSize does not
calculate with inherited style". Includes manual regression test. r=me, (Closes #1906). CLA on file. git-svn-id: http://svn.openlayers.org/trunk/openlayers@8906 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -484,8 +484,14 @@ OpenLayers.Popup = OpenLayers.Class({
|
||||
var preparedHTML = "<div class='" + this.contentDisplayClass+ "'>" +
|
||||
this.contentDiv.innerHTML +
|
||||
"<div>";
|
||||
|
||||
var containerElement = (this.map) ? this.map.layerContainerDiv
|
||||
: document.body;
|
||||
var realSize = OpenLayers.Util.getRenderedDimensions(
|
||||
preparedHTML, null, { displayClass: this.displayClass }
|
||||
preparedHTML, null, {
|
||||
displayClass: this.displayClass,
|
||||
containerElement: containerElement
|
||||
}
|
||||
);
|
||||
|
||||
// is the "real" size of the div is safe to display in our map?
|
||||
@@ -514,8 +520,10 @@ OpenLayers.Popup = OpenLayers.Class({
|
||||
//content is clipped in only one direction, so we need to
|
||||
// run getRenderedDimensions() again with a fixed dimension
|
||||
var clippedSize = OpenLayers.Util.getRenderedDimensions(
|
||||
preparedHTML, fixedSize,
|
||||
{ displayClass: this.contentDisplayClass }
|
||||
preparedHTML, fixedSize, {
|
||||
displayClass: this.contentDisplayClass,
|
||||
containerElement: containerElement
|
||||
}
|
||||
);
|
||||
|
||||
//if the clipped size is still the same as the safeSize,
|
||||
|
||||
Reference in New Issue
Block a user