Ticket #1737 (closed bug: fixed)
Popup.FramedCloud Doesn't Work Well With Slightly Transparent Background Images
| Reported by: | openlayers | Owned by: | euzuro |
|---|---|---|---|
| Priority: | minor | Milestone: | 2.8 Release |
| Component: | Popup.FramedCloud | Version: | 2.7 RC2 |
| Keywords: | Cc: | chris@… | |
| State: | Complete |
Description
I was experimenting with the FramedCloud popup in 2.7-RC2 and I wanted to have a slightly transparent popup, while retaining the frame.
I replaced the image source:trunk/openlayers/img/cloud-popup-relative.png with a custom one I made such that instead of white, the background is black and slightly transparent (see attached file).
However, doing this by itself didn't work as the values in FramedCloud.positionBlocks under the size, anchor and position properties weren't correct in all cases. This left me with some overlap between the 5 pieces that make up the final image. When there is transparency involved, this gets ugly.
To reproduce this behavior, drop in the attached image file as a replacement for source:trunk/openlayers/img/cloud-popup-relative.png and view the popupMatrix.html example. Create some FramedCloud popups where the stem is on the bottom of the popup and you'll see the overlap (or missing background in the case when the stem is in the lower right corner).
So I did some tweaking and got what I found to seem to be correct values. I wanted to let you guys know what they are and let you do with the changes as you see fit.
I attached the patch I made based off 2.7-RC2.

