Fix for Anchored popup does not respect anchor size when relative position is
'tl', (Closes #2651) git-svn-id: http://svn.openlayers.org/trunk/openlayers@10700 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -185,10 +185,10 @@ OpenLayers.Popup.Anchored =
|
|||||||
var size = this.size || this.contentSize;
|
var size = this.size || this.contentSize;
|
||||||
|
|
||||||
var top = (this.relativePosition.charAt(0) == 't');
|
var top = (this.relativePosition.charAt(0) == 't');
|
||||||
newPx.y += (top) ? -size.h : this.anchor.size.h;
|
newPx.y += (top) ? -(size.h + this.anchor.size.h) : this.anchor.size.h;
|
||||||
|
|
||||||
var left = (this.relativePosition.charAt(1) == 'l');
|
var left = (this.relativePosition.charAt(1) == 'l');
|
||||||
newPx.x += (left) ? -size.w : this.anchor.size.w;
|
newPx.x += (left) ? -(size.w + this.anchor.size.w) : this.anchor.size.w;
|
||||||
|
|
||||||
return newPx;
|
return newPx;
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user