[Pkg-javascript-commits] [leaflet-markercluster] 128/479: Be more careful tidying up _projCenter otherwise it is still set later and we fail at clustering randomly
Jonas Smedegaard
dr at jones.dk
Thu Oct 16 16:00:19 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 fa1245d6a5bb58770c771383e527ee1594cc9c04
Author: danzel <danzel at localhost.geek.nz>
Date: Fri Jul 27 15:58:19 2012 +1200
Be more careful tidying up _projCenter otherwise it is still set later and we fail at clustering randomly
---
src/MarkerClusterGroup.js | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/MarkerClusterGroup.js b/src/MarkerClusterGroup.js
index 796e0ec..ed2b26c 100644
--- a/src/MarkerClusterGroup.js
+++ b/src/MarkerClusterGroup.js
@@ -232,6 +232,8 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
if (this._sqDist(markerPos, mPos) <= clusterDiameterSqrd) {
//Create a new cluster with these 2
var newCluster = new L.MarkerCluster(this, m, newMarker);
+ delete m._projCenter;
+ delete newMarker._projCenter;
unclusteredMarkers.splice(i, 1);
return newCluster;
@@ -263,6 +265,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
c = clusters[j];
if (this._sqDist(point._projCenter, c._projCenter) <= clusterRadiusSqrd) {
c._addChild(point);
+ delete point._projCenter;
c._projCenter = this._map.project(c.getLatLng(), zoom);
used = 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