[Pkg-javascript-commits] [leaflet-markercluster] 177/479: Utilize option to clusterSingleMarkers

Jonas Smedegaard dr at jones.dk
Thu Oct 16 16:00:27 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 208c85ca7964b962d5eea3034b884e3eaaf5c5e8
Author: Alec Winograd <awinograd at gmail.com>
Date:   Mon Aug 20 16:33:08 2012 -0700

    Utilize option to clusterSingleMarkers
---
 src/MarkerClusterGroup.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/MarkerClusterGroup.js b/src/MarkerClusterGroup.js
index f56c242..adc47fb 100644
--- a/src/MarkerClusterGroup.js
+++ b/src/MarkerClusterGroup.js
@@ -327,7 +327,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
 
 		// any clusters that did not end up being a child of a new cluster, make them a child of a new cluster
 		unclustered.eachObject(function (cluster) {
-			if (cluster instanceof L.MarkerCluster) {
+			if (cluster instanceof L.MarkerCluster || (group.options.clusterSingleMarkers && cluster instanceof L.Marker)) {
 				newCluster = new L.MarkerCluster(group, cluster);
 				newCluster._haveGeneratedChildClusters = true;
 

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