[OpenLayers-Dev] Re: OpenLayers.Popup.FramedCloud rendering problem

Xavier Mamano (jorix) xavier.mamano at gmail.com
Sat Nov 20 11:59:46 EST 2010


Hi,

Yes, There is a bug in the positioning of "Popup.FramedCloud" when an anchor
is used, but is due to a bug in "Popup.Anchored"

The bug can be corrected by changing two lines of code in "Popup.Anchored":


Index: lib/OpenLayers/Popup/Anchored.js
===================================================================
--- lib/OpenLayers/Popup/Anchored.js	(revisión: 10904)
+++ lib/OpenLayers/Popup/Anchored.js	()
@@ -186,10 +186,10 @@
         var size = this.size || this.contentSize;
 
         var top = (this.relativePosition.charAt(0) == 't');
-        newPx.y += (top) ? -(size.h + this.anchor.size.h) :
this.anchor.size.h;
+        newPx.y += (top) ? - size.h : this.anchor.size.h;
         
         var left = (this.relativePosition.charAt(1) == 'l');
-        newPx.x += (left) ? -(size.w + this.anchor.size.w) :
this.anchor.size.w;
+        newPx.x += (left) ? - size.w : this.anchor.size.w;
 
         return newPx;   
     },


This is not yet a solution accepted by OpenLayers, I opened a ticket 
http://trac.osgeo.org/openlayers/ticket/2870 #2870  to solve the problems
but nobody has yet reviewed.

There is also a small problem on the border for which I have not written
solution, see  http://trac.osgeo.org/openlayers/ticket/2939 #2939 .

Regards,

Xavier


Kiks wrote:
> 
> Hi, 
> I've noticed that with the OL 2.10 release the
> OpenLayers.Popup.FramedCloud has a rendering problem that doesn't show
> correctly the "cloud". 
> Anyone else has this little problem? 
> 
> Kiks
> 

-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/OpenLayers-Popup-FramedCloud-rendering-problem-tp5530749p5758474.html
Sent from the OpenLayers Dev mailing list archive at Nabble.com.


More information about the Dev mailing list