From fd1b295b9509a0dd97f5c9a715995e2c63f383c0 Mon Sep 17 00:00:00 2001 From: vingiarrusso Date: Wed, 27 May 2015 16:34:06 -0700 Subject: [PATCH 1/2] add isPopupOpen method to layer --- src/layer/Layer.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/layer/Layer.js b/src/layer/Layer.js index 579d30b5..55843063 100644 --- a/src/layer/Layer.js +++ b/src/layer/Layer.js @@ -35,6 +35,10 @@ L.Layer = L.Evented.extend({ return this; }, + isPopupOpen: function() { + return !!(this._map._popup && this._map._popup.isOpen); + }, + _layerAdd: function (e) { var map = e.target; From 376820ff636604144e6a008e2ff6643be2ad0cda Mon Sep 17 00:00:00 2001 From: vingiarrusso Date: Wed, 27 May 2015 16:59:54 -0700 Subject: [PATCH 2/2] use existing method on popup --- src/layer/Layer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layer/Layer.js b/src/layer/Layer.js index 55843063..b34dcc96 100644 --- a/src/layer/Layer.js +++ b/src/layer/Layer.js @@ -36,7 +36,7 @@ L.Layer = L.Evented.extend({ }, isPopupOpen: function() { - return !!(this._map._popup && this._map._popup.isOpen); + return this._popup.isOpen(); }, _layerAdd: function (e) {