[OpenLayers-Users] Forcing FramedCloud autoResize when using stylesheets

Adrian Popa adrian_gh.popa at romtelecom.ro
Tue Nov 10 08:34:49 EST 2009


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.




More information about the Users mailing list