[Pkg-javascript-commits] [leaflet-markercluster] 271/479: Remove __layer property on markers that are removed, otherwise on re-adding them we'll assume they are already added. Woops!

Jonas Smedegaard dr at jones.dk
Thu Oct 16 16:00:38 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository leaflet-markercluster.

commit 89d22369176514019489fc1c6a7b4dd5efa97aa9
Author: danzel <danzel at localhost.geek.nz>
Date:   Wed Oct 17 15:16:27 2012 +1300

    Remove __layer property on markers that are removed, otherwise on re-adding them we'll assume they are already added. Woops!
---
 src/MarkerClusterGroup.js | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/MarkerClusterGroup.js b/src/MarkerClusterGroup.js
index cf4434b..31ff227 100644
--- a/src/MarkerClusterGroup.js
+++ b/src/MarkerClusterGroup.js
@@ -120,6 +120,9 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
 			L.FeatureGroup.prototype.removeLayer.call(this, layer);
 			layer.setOpacity(1);
 		}
+
+		delete layer.__parent;
+
 		return this;
 	},
 

-- 
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