From 85ccc6c638bb7ec8e74daea58e97b25c21d9c917 Mon Sep 17 00:00:00 2001 From: euzuro Date: Mon, 29 May 2006 19:43:45 +0000 Subject: [PATCH] the add() and offset() functions return new copies of the OpenLayers.Pixel Objects and do not affect the original. Personally, I think this is a horrible way of doing things, but this is how it has been. Maybe something to change for in the future. git-svn-id: http://svn.openlayers.org/trunk/openlayers@461 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Popup/Anchored.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/OpenLayers/Popup/Anchored.js b/lib/OpenLayers/Popup/Anchored.js index 39c45e0384..dcf03f6925 100644 --- a/lib/OpenLayers/Popup/Anchored.js +++ b/lib/OpenLayers/Popup/Anchored.js @@ -107,11 +107,7 @@ OpenLayers.Popup.Anchored.prototype = * @type OpenLayers.Pixel */ calculateNewPx:function(px) { - var newPx = px.copyOf(); - - //adjust for offset - newPx.offset(this.anchor.offset); - + var newPx = px.offset(this.anchor.offset); var top = (this.relativePosition.charAt(0) == 't'); newPx.y += (top) ? -this.size.h : this.anchor.size.h;