Merge pull request #3908 from danzel/popup-movement
bringToFront / bringToBack for popups.
This commit is contained in:
commit
ec714a76f3
@ -5,7 +5,9 @@ Leaflet Changelog
|
||||
|
||||
## 1.0-dev (master)
|
||||
|
||||
An in-progress version being developed on the `master` branch. No changes since the last tagged release yet.
|
||||
An in-progress version being developed on the `master` branch.
|
||||
|
||||
* Added `bringToFront` and `bringToBack` to popups (by [@danzel](https://github.com/danzel)). [#3908](https://github.com/Leaflet/Leaflet/pull/3908) [#3307](https://github.com/Leaflet/Leaflet/issues/3813)
|
||||
|
||||
## 1.0-beta1 (July 14, 2015)
|
||||
|
||||
|
@ -143,6 +143,20 @@ L.Popup = L.Layer.extend({
|
||||
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 () {
|
||||
if (this._map) {
|
||||
this._map.closePopup(this);
|
||||
|
Loading…
Reference in New Issue
Block a user