[Pkg-javascript-commits] [leaflet-markercluster] 14/128: Merge branch 'leaflet-master' into leaflet-master-merge
Jonas Smedegaard
dr at jones.dk
Sun Apr 16 06:25:59 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 ac71269a417cf61df425c6c8cd6c05afb3f983fa
Merge: 10d440b 102f147
Author: Iván Sánchez Ortega <ivan at mazemap.no>
Date: Wed Oct 7 12:55:15 2015 +0200
Merge branch 'leaflet-master' into leaflet-master-merge
src/MarkerCluster.Spiderfier.js | 99 ++++++++++++++++++++++-------------------
src/MarkerClusterGroup.js | 63 +++++++++++++++++++-------
2 files changed, 100 insertions(+), 62 deletions(-)
diff --cc src/MarkerCluster.Spiderfier.js
index 9ef784a,d44b348..99ba453
--- a/src/MarkerCluster.Spiderfier.js
+++ b/src/MarkerCluster.Spiderfier.js
@@@ -200,12 -208,8 +208,13 @@@ L.MarkerCluster.include(!L.DomUtil.TRAN
}
- //Add Legs. Force the SVG renderer so we can animate
- leg = new L.Polyline([me._latlng, newPos], { weight: 1.5, color: '#222', opacity: initialLegOpacity });
+ //Add Legs.
+ var legOptions = this._group.options.spiderLegPolylineOptions;
+ if (legOptions.opacity === undefined) {
+ legOptions.opacity = initialLegOpacity;
+ }
+ leg = new L.Polyline([me._latlng, newPos], legOptions);
++
map.addLayer(leg);
m._spiderLeg = leg;
diff --cc src/MarkerClusterGroup.js
index 2a19e7e,956d27f..209fff9
--- a/src/MarkerClusterGroup.js
+++ b/src/MarkerClusterGroup.js
@@@ -149,10 -146,12 +149,12 @@@ L.MarkerClusterGroup = L.FeatureGroup.e
//Remove the marker from clusters
this._removeLayer(layer, true);
+ layer.off('move', this._childMarkerMoved, this);
+
if (this._featureGroup.hasLayer(layer)) {
this._featureGroup.removeLayer(layer);
- if (layer.setOpacity) {
- layer.setOpacity(1);
+ if (layer.clusterShow) {
+ layer.clusterShow();
}
}
@@@ -1048,9 -1045,11 +1075,11 @@@ L.MarkerClusterGroup.include(!L.DomUtil
if (cluster._childCount === 1) {
var m = cluster._markers[0];
//If we were in a cluster animation at the time then the opacity and position of our child could be wrong now, so fix it
+ this._ignoreMove = true;
m.setLatLng(m.getLatLng());
+ this._ignoreMove = false;
- if (m.setOpacity) {
- m.setOpacity(1);
+ if (m.clusterShow) {
+ m.clusterShow();
}
} else {
cluster._recursively(bounds, newZoomLevel, 0, function (c) {
--
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