From 54fd1f561cc2899366ea93a028a88e476f8e37ec Mon Sep 17 00:00:00 2001 From: crschmidt Date: Thu, 26 Aug 2010 14:35:00 +0000 Subject: [PATCH] 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 --- lib/OpenLayers/Popup/Anchored.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; },