[Pkg-javascript-commits] [leaflet-markercluster] 91/128: Fixed leaflet 1.0.2 bug where clearLayers would throw an exception

Jonas Smedegaard dr at jones.dk
Sun Apr 16 06:26:07 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 fa20d91b07ade430278d86f29eb0502c9e63e74d
Author: marcianoviereck92 <marciano.viereck at simacan.com>
Date:   Mon Jan 2 14:40:14 2017 +0100

    Fixed leaflet 1.0.2 bug where clearLayers would throw an exception
    
    The exception was that the function 'this._childmarkerMoved' could not be found because the context was not known. So I passed the context in the 'eachLayer' function
---
 src/MarkerClusterGroup.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/MarkerClusterGroup.js b/src/MarkerClusterGroup.js
index b6634c0..4031a68 100644
--- a/src/MarkerClusterGroup.js
+++ b/src/MarkerClusterGroup.js
@@ -409,7 +409,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
 		this.eachLayer(function (marker) {
 			marker.off('move', this._childMarkerMoved, this);
 			delete marker.__parent;
-		});
+		}, this);
 
 		if (this._map) {
 			//Reset _topClusterLevel and the DistanceGrids

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