popup close on click fix
This commit is contained in:
parent
5394f0163c
commit
c988eeafa7
@ -6,7 +6,6 @@ L.Popup = L.Class.extend({
|
|||||||
maxWidth: 300,
|
maxWidth: 300,
|
||||||
autoPan: true,
|
autoPan: true,
|
||||||
closeButton: true,
|
closeButton: true,
|
||||||
closeOnMapClick: true,
|
|
||||||
|
|
||||||
offset: new L.Point(0, 0),
|
offset: new L.Point(0, 0),
|
||||||
autoPanPadding: new L.Point(5, 5)
|
autoPanPadding: new L.Point(5, 5)
|
||||||
@ -27,7 +26,9 @@ L.Popup = L.Class.extend({
|
|||||||
|
|
||||||
this._map._panes.popupPane.appendChild(this._container);
|
this._map._panes.popupPane.appendChild(this._container);
|
||||||
this._map.on('viewreset', this._updatePosition, this);
|
this._map.on('viewreset', this._updatePosition, this);
|
||||||
|
if (this._map.options.closePopupOnClick) {
|
||||||
this._map.on('click', this._close, this);
|
this._map.on('click', this._close, this);
|
||||||
|
}
|
||||||
this._update();
|
this._update();
|
||||||
|
|
||||||
this._container.style.opacity = '1'; //TODO fix ugly opacity hack
|
this._container.style.opacity = '1'; //TODO fix ugly opacity hack
|
||||||
|
Loading…
Reference in New Issue
Block a user