[Pkg-javascript-commits] [leaflet] 234/301: add multipoly openPopup, close #2046
Jonas Smedegaard
js at moszumanska.debian.org
Mon Jan 27 22:22:53 UTC 2014
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository leaflet.
commit 9fc4e661d65294a9f38bcbdc174cbd701324f77f
Author: Vladimir Agafonkin <agafonkin at gmail.com>
Date: Wed Nov 13 13:17:17 2013 +0200
add multipoly openPopup, close #2046
---
src/layer/FeatureGroup.js | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/layer/FeatureGroup.js b/src/layer/FeatureGroup.js
index aa12d9b..710ba96 100644
--- a/src/layer/FeatureGroup.js
+++ b/src/layer/FeatureGroup.js
@@ -53,6 +53,15 @@ L.FeatureGroup = L.LayerGroup.extend({
return this.invoke('bindPopup', content, options);
},
+ openPopup: function (latlng) {
+ // open popup on the first layer
+ for (var id in this._layers) {
+ this._layers[id].openPopup(latlng);
+ break;
+ }
+ return this;
+ },
+
setStyle: function (style) {
return this.invoke('setStyle', style);
},
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/leaflet.git
More information about the Pkg-javascript-commits
mailing list