Update: - it seems I was partially wrong. The div settings for the decoration divs are correct - but it seems the popup background image doesn't get any larger... I will look into it.
Adrian Popa wrote: > Hello everyone, > > I have done some more digging, and it seems the FramedCloud popup has > a default maximum width of 600px (or so it seems when I inspect items > with firebug). I tried to set max size to something larger > (popup.maxSize = new OpenLayers.Size(1300, 1000);) and it seems to > work (partially). > > The popup gets larger to accomodate content with width greater than > 600px, but not all the popup's decorations are streched. > > My popup's base id is "activeAlarm" - and from what I can tell the > following divs get resized: > * activeAlarm_contentDiv > * activeAlarm_GroupDiv > * activeAlarm > ... but the following divs don't get resized: > * activeAlarm_FrameDecorationDiv_1 > * activeAlarm_FrameDecorationDiv_2 > * activeAlarm_FrameDecorationDiv_3 > * activeAlarm_FrameDecorationDiv_4 > > I have attached an image that illustrates this. Note that also the > background of the popup isn't streched (remains transparent) (most > likely it's one of the decoration divs...). > > Is this a known bug, or am I doing something wrong? If it's a bug, is > there a quick workaround? I can think of setting the width parameter > for all the decoration divs, but I'm hoping it won't be necessary... > > Thanks, > Adrian > > Adrian Popa wrote: >> Hello everyone, >> >> If this subject has been discussed before, please point me to the >> relevant thread. >> >> I have a FramedCloud popup which gets its content through an ajax >> call. Everything works ok (the popup is the same size as the >> content) if I don't change the size of the fonts in the popup. In >> some cases, I have to override the default font size and make it >> bigger. In these cases, the popup doesn't resize properly. For >> instance, if the content has 'font-size: 11px' it fits the popup, but >> if the content has 'font-size: 22px', the popup grows in height, but >> the width remains the same as the first case. >> >> By the way, my content is usually a table (which has applied the >> style='font-size: 22px;' attribute). >> >> My questions are: >> 1. Is this behavior a known problem or should autoResize work without >> problems? >> 2. I could call - as a workaround a function to autoRezise the popup >> after the ajax call completes. Question is - what is this function? >> (I haven't found anything in the api) >> 3. I could set maxSize/minSize - but I have no idea how to calculate >> the width/height of my content (in case there are no other >> workarounds I could *estimate* it based on number of characters per >> line + font size - but it's way too cumbersome to be a real solution) >> >> Thanks, >> Adrian. >> >> _______________________________________________ >> Users mailing list >> [email protected] >> http://openlayers.org/mailman/listinfo/users >> >> _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
