Ticket #1906 (closed bug: fixed)
Util.getRenderedSize does not calculate with inherited style
| Reported by: | gregers | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | 2.8 Release |
| Component: | Util | Version: | 2.7 |
| Keywords: | Cc: | openlayers.arealjerk@… | |
| State: | Complete |
Description
Util.getRenderedSize inserts contentHTML directly on document.body instead of where the content will be inserted. So if the resulting size might be different if for instance the popup content inherits text/font styling.
This has been discussed on the mailinglist: http://n2.nabble.com/FramedCloud-and-autoSize-td1829440.html Matthew Atkins Jun 20, 2008; 04:34pm
I've created a patch for Util.js that adds an optional property to the options object for getRenderedSize. If this option is supplied, the default (document.body) will be overridden by this value, and the content will be inserted here instead of the body root.
I also changed Popup.js, so getRenderedSize uses map.layerContainerDiv instead of body.

