bringToFront / bringToBack for popups.

Fixes #3813
This commit is contained in:
danzel 2015-10-09 09:49:49 +13:00
parent 441a02b85a
commit 8f6d188088

View File

@ -143,6 +143,20 @@ L.Popup = L.Layer.extend({
return !!this._map && this._map.hasLayer(this); return !!this._map && this._map.hasLayer(this);
}, },
bringToFront: function () {
if (this._map) {
L.DomUtil.toFront(this._container);
}
return this;
},
bringToBack: function () {
if (this._map) {
L.DomUtil.toBack(this._container);
}
return this;
},
_close: function () { _close: function () {
if (this._map) { if (this._map) {
this._map.closePopup(this); this._map.closePopup(this);