fix for #555 - popup close no longer triggers events in main map

git-svn-id: http://svn.openlayers.org/trunk/openlayers@3081 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2007-04-17 16:15:07 +00:00
parent 115fc7462b
commit e93aa40e2c

View File

@@ -104,8 +104,12 @@ OpenLayers.Popup.prototype = {
closeImg.style.top = this.padding + "px"; closeImg.style.top = this.padding + "px";
this.div.appendChild(closeImg); this.div.appendChild(closeImg);
var closeEvents = new OpenLayers.Events(this, closeImg); var closePopup = function(e) {
closeEvents.register("mousedown", this, this.hide); this.hide();
OpenLayers.Event.stop(e);
}
OpenLayers.Event.observe(closeImg, "click",
closePopup.bindAsEventListener(this));
} }