[OpenLayers-Users] FramedCloud and autoSize
Erik Uzureau
euzuro at gmail.com
Tue Jun 24 02:52:53 EDT 2008
I think this is something worthy of fixing. I apologize upfront that I
have been horribly horribly behind on OL affairs... but has anyone put
this specific bug into a ticket in trac? If not, could someone do it.
Sometime in the very near future I am going to sit down and do some
working fixing these. Certainly pre-2.7
On 6/20/08, Matthew Atkins <Matthew.Atkins at loyola.com> wrote:
> Wendell,
>
> As Chris mentioned the patch to ticket 1570 is not the entire solution.
> You will need to watch out for how you are defining your CSS with the
> FramedCloud content. The getRenderedDimensions() function creates a new
> DIV off-screen in order to calculate the size of the HTML content
> dynamically but it does not inherit the CSS rules like
> ".olFramedCloudPopupContent" and it is not inserted at the same level in
> the DOM hierarchy (it's appended to the document's BODY).
>
> So if you write CSS for your popup's content with selectors like:
>
> .olFramedCloudPopupContent h2 { /* rules */ }
> .olFramedCloudPopupContent table { /* rules */ }
> .olFramedCloudPopupContent p { /* rules */ }
>
> The styles will be applied to the content when it shows within the popup
> on-screen but the calculated size will be incorrect because the CSS
> rules were not applied (do not match) off-screen.
>
> Wally Atkins
>
> -----Original Message-----
> From: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org]
> On Behalf Of Wendell Turner
> Sent: Friday, June 20, 2008 9:01 AM
> To: users at openlayers.org
> Subject: Re: [OpenLayers-Users] FramedCloud and autoSize
>
> On Thu, Jun 19, 2008 at 11:19:58PM -0400, Christopher Schmidt wrote:
> > On Thu, Jun 19, 2008 at 09:42:24PM -0500, Erik Uzureau wrote:
> > > Dear Wendell,
> > >
> > > There is a bug in the getRenderedDimensions() function which was
> > > found, reported, and fixed by a superstar member from the community,
> > > one Wally somethingerother.
> > >
> > > The fix is here:
> > > http://trac.openlayers.org/ticket/1570
> > >
> > > ... and in trunk as well. Hopefully that will help getting those
> sizes
> > > fixed up right.
> >
> > I actually sort of doubt that this is the entire solution. One problem
> > is that paddings (or maybe it's margins) on elements aren't
> neccesarily
> > included in the calculations of scrollWidth.
> >
> > I typically do something like:
> > .olPopupContent h2 { margin: 0px; padding: 0px; }
> >
> > to minimize the padding around my headers so that they don't get
> > included.
> >
> > -- Chris
> >
> > > Let us know if it works,
>
> Yes, the patch works great! Thanks to Wally Atkins and the
> rest. I'll also try the margin padding, that should help.
>
> Wendell
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
More information about the Users
mailing list