[Pkg-javascript-commits] [leaflet-markercluster] 299/479: Fix clearLayers not unsetting __parent of the markers, preventing them from being re-added. Fixes #99

Jonas Smedegaard dr at jones.dk
Thu Oct 16 16:00:44 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 e86afca04ad72e727ac4718da46bcbb88f865614
Author: danzel <danzel at localhost.geek.nz>
Date:   Thu Dec 6 13:42:27 2012 +1300

    Fix clearLayers not unsetting __parent of the markers, preventing them from being re-added. Fixes #99
---
 src/MarkerClusterGroup.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/MarkerClusterGroup.js b/src/MarkerClusterGroup.js
index 7d2dd19..ed8d2c6 100644
--- a/src/MarkerClusterGroup.js
+++ b/src/MarkerClusterGroup.js
@@ -209,6 +209,10 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
 			}
 		}
 
+		this.eachLayer(function (marker) {
+			delete marker.__parent;
+		});
+
 		if (this._map) {
 			//Reset _topClusterLevel and the DistanceGrids
 			this._generateInitialClusters();

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