Since popups have a reference back to map, allow them to determine where they should be drawn internally. Thus we can remove the computing from the addPopup() function in Map.js.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@346 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -172,8 +172,7 @@ OpenLayers.Map.prototype = {
|
||||
addPopup: function(popup) {
|
||||
popup.map = this;
|
||||
this.popups.push(popup);
|
||||
var px = this.getLayerPxFromLonLat(popup.lonlat)
|
||||
var popupDiv = popup.draw(px);
|
||||
var popupDiv = popup.draw();
|
||||
if (popupDiv) {
|
||||
popupDiv.style.zIndex = this.Z_INDEX_BASE['Popup'] +
|
||||
this.popups.length;
|
||||
|
||||
Reference in New Issue
Block a user