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
This commit is contained in:
euzuro
2006-05-25 02:22:06 +00:00
parent df5455e41e
commit 53f59f25ea

View File

@@ -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
*