[Pkg-javascript-commits] [leaflet-markercluster] 107/128: If a marker is moved with an open popup on it, re-open the popup after moving it. Fixes #651
Jonas Smedegaard
dr at jones.dk
Sun Apr 16 06:26:08 UTC 2017
This is an automated email from the git hooks/post-receive script.
js pushed a commit to branch master
in repository leaflet-markercluster.
commit b67410966b69a0b562df41ca0950f3a77d0eaeb8
Author: danzel <dave at smartrak.co.nz>
Date: Fri Jan 27 10:51:33 2017 +1300
If a marker is moved with an open popup on it, re-open the popup after moving it. Fixes #651
---
src/MarkerClusterGroup.js | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/MarkerClusterGroup.js b/src/MarkerClusterGroup.js
index ee94f71..18111c7 100644
--- a/src/MarkerClusterGroup.js
+++ b/src/MarkerClusterGroup.js
@@ -670,7 +670,13 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
_childMarkerMoved: function (e) {
if (!this._ignoreMove && !e.target.__dragStart) {
+ var isPopupOpen = e.target._popup && e.target._popup.isOpen();
+
this._moveChild(e.target, e.oldLatLng, e.latlng);
+
+ if (isPopupOpen) {
+ e.target.openPopup();
+ }
}
},
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/leaflet-markercluster.git
More information about the Pkg-javascript-commits
mailing list