diff --git a/lib/OpenLayers/Popup/Anchored.js b/lib/OpenLayers/Popup/Anchored.js index c0cd89daca..c7851c2de6 100644 --- a/lib/OpenLayers/Popup/Anchored.js +++ b/lib/OpenLayers/Popup/Anchored.js @@ -185,10 +185,10 @@ OpenLayers.Popup.Anchored = var size = this.size || this.contentSize; 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'); - newPx.x += (left) ? -size.w : this.anchor.size.w; + newPx.x += (left) ? -(size.w + this.anchor.size.w) : this.anchor.size.w; return newPx; },