fix popup autoclose, fixes #40
This commit is contained in:
parent
c2102d5402
commit
6ce60cadc7
@ -27,7 +27,7 @@ L.Popup = L.Class.extend({
|
||||
this._map._panes.popupPane.appendChild(this._container);
|
||||
this._map.on('viewreset', this._updatePosition, this);
|
||||
if (this._map.options.closePopupOnClick) {
|
||||
this._map.on('click', this._close, this);
|
||||
this._map.on('preclick', this._close, this);
|
||||
}
|
||||
this._update();
|
||||
|
||||
|
@ -399,10 +399,12 @@ L.Map = L.Class.extend({
|
||||
|
||||
_onMouseClick: function(e) {
|
||||
if (this.dragging && this.dragging.moved()) { return; }
|
||||
|
||||
this._fireMouseEvent(e);
|
||||
},
|
||||
|
||||
_fireMouseEvent: function(e) {
|
||||
this.fire('pre' + e.type);
|
||||
if (!this.hasEventListeners(e.type)) { return; }
|
||||
this.fire(e.type, {
|
||||
latlng: this.mouseEventToLatLng(e),
|
||||
|
Loading…
Reference in New Issue
Block a user