[Pkg-javascript-commits] [leaflet-markercluster] 05/479: Cludging towards add support. I think this does it.
Jonas Smedegaard
dr at jones.dk
Thu Oct 16 16:00:02 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 9c514d7c082c7640cbbcdfacd697872d3cda5142
Author: danzel <danzel at localhost.geek.nz>
Date: Wed Jul 11 16:26:25 2012 +1200
Cludging towards add support. I think this does it.
---
src/MarkerCluster.js | 1 -
src/MarkerClusterGroup.js | 8 +++++++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/MarkerCluster.js b/src/MarkerCluster.js
index 8d2a0f8..72b35c0 100644
--- a/src/MarkerCluster.js
+++ b/src/MarkerCluster.js
@@ -49,7 +49,6 @@ L.MarkerCluster = L.Marker.extend({
this._expandBounds(new1);
},
- //TODO: Replace with L.LatLngBounds
_expandBounds: function (marker) {
if (marker instanceof L.MarkerCluster) {
diff --git a/src/MarkerClusterGroup.js b/src/MarkerClusterGroup.js
index 5fbeb3f..0a846d4 100644
--- a/src/MarkerClusterGroup.js
+++ b/src/MarkerClusterGroup.js
@@ -18,7 +18,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
c += 'large';
}
- return new L.DivIcon({ html: '<div><span>' + childCount + '</span></div>', elementType: 'span', className: 'marker-cluster' + c, iconSize: new L.Point(40, 40) });
+ return new L.DivIcon({ html: '<div><span>' + childCount + '</span></div>', className: 'marker-cluster' + c, iconSize: new L.Point(40, 40) });
}
},
@@ -198,6 +198,12 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
var me = this;
setTimeout(function () {
me._animationStart();
+ for (var j = 0; j < newClusters.clusters.length; j++) {
+ var v = newClusters.clusters[j];
+ if (v._icon) {
+ v.setLatLng(v._latlng);
+ }
+ }
me._animationZoomOut(newClusters.clusters, 1);
}, 0);
--
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