Le Thursday 23 July 2009, à 08:44:41AM -0400, Dave a écrit : > I get 24px as well, guess firefox has a bug. > > > yes, > > I checked what happens in OpenLayers.Util.getRenderedDimensions (because > > that's method report a wrong result), and made a testcase that exhibits the > > behaviour I'm seeing: > > http://renevier.net/misc/ol_autosizeimg_2.html > > If the bug is not triggered when loading the page, try reloading by > > pressing > > Ctrl-Shift-R simultaneously, or by pressing Shift and clicking reload > > button > > simultaneously. If the bug still not shows, try to reload that way 2 or 3 > > times. > > > > On my testcase (ol_autosizeimg_2.html), does someone sometimes get a result > > of > > "24px" as I do, or do everyone see "465 px" ?
ok, In case someone else encounters that problem, I could work around by redefining registerImageListeners method: in onImgLoad, before calling this.popup.updateSize(), I set this.img.width = this.img.width; this.img.height = this.img.height; That way, image dimensions are set in contentDiv.innerHTML, and getRenderedDimensions computes popup size correctly. arno
signature.asc
Description: Digital signature
_______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
