From 53f59f25ea114df96da05e7c19eb0bef4ecda43e Mon Sep 17 00:00:00 2001 From: euzuro Date: Thu, 25 May 2006 02:22:06 +0000 Subject: [PATCH] changing the size of an anchored popup is a special case because the popup must remain anchored after the resize git-svn-id: http://svn.openlayers.org/trunk/openlayers@347 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Popup/Anchored.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/OpenLayers/Popup/Anchored.js b/lib/OpenLayers/Popup/Anchored.js index 44130cc277..c27569a083 100644 --- a/lib/OpenLayers/Popup/Anchored.js +++ b/lib/OpenLayers/Popup/Anchored.js @@ -78,6 +78,18 @@ OpenLayers.Popup.Anchored.prototype = OpenLayers.Popup.prototype.moveTo.apply(this, newArguments); }, + /** + * @param {OpenLayers.Size} size + */ + setSize:function(size) { + OpenLayers.Popup.prototype.setSize.apply(this, arguments); + + if ((this.lonlat) && (this.map)) { + var px = this.map.getLayerPxFromLonLat(this.lonlat); + this.moveTo(px); + } + }, + /** * @private *