[Pkg-javascript-commits] [leaflet-markercluster] 103/128: Fix a few more cases where negative minZoom wasn't handled. refs #704

Jonas Smedegaard dr at jones.dk
Sun Apr 16 06:26:08 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 cbfdb9806f31d8e486a78adb14af2e6f74f27f2e
Author: danzel <dave at smartrak.co.nz>
Date:   Thu Jan 26 13:21:05 2017 +1300

    Fix a few more cases where negative minZoom wasn't handled. refs #704
---
 src/MarkerCluster.js | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/MarkerCluster.js b/src/MarkerCluster.js
index c953124..07121e4 100644
--- a/src/MarkerCluster.js
+++ b/src/MarkerCluster.js
@@ -213,7 +213,7 @@ L.MarkerCluster = L.Marker.extend({
 	},
 
 	_recursivelyAnimateChildrenIn: function (bounds, center, maxZoom) {
-		this._recursively(bounds, 0, maxZoom - 1,
+		this._recursively(bounds, this._group._map.getMinZoom(), maxZoom - 1,
 			function (c) {
 				var markers = c._markers,
 					i, m;
@@ -242,7 +242,7 @@ L.MarkerCluster = L.Marker.extend({
 	},
 
 	_recursivelyAnimateChildrenInAndAddSelfToMap: function (bounds, previousZoomLevel, newZoomLevel) {
-		this._recursively(bounds, newZoomLevel, 0,
+		this._recursively(bounds, newZoomLevel, this._group._map.getMinZoom(),
 			function (c) {
 				c._recursivelyAnimateChildrenIn(bounds, c._group._map.latLngToLayerPoint(c.getLatLng()).round(), previousZoomLevel);
 
@@ -261,7 +261,7 @@ L.MarkerCluster = L.Marker.extend({
 	},
 
 	_recursivelyBecomeVisible: function (bounds, zoomLevel) {
-		this._recursively(bounds, 0, zoomLevel, null, function (c) {
+		this._recursively(bounds, this._group._map.getMinZoom(), zoomLevel, null, function (c) {
 			c.clusterShow();
 		});
 	},
@@ -331,7 +331,7 @@ L.MarkerCluster = L.Marker.extend({
 	//exceptBounds: If set, don't remove any markers/clusters in it
 	_recursivelyRemoveChildrenFromMap: function (previousBounds, zoomLevel, exceptBounds) {
 		var m, i;
-		this._recursively(previousBounds, -1, zoomLevel - 1,
+		this._recursively(previousBounds, this._group._map.getMinZoom() - 1, zoomLevel - 1,
 			function (c) {
 				//Remove markers at every level
 				for (i = c._markers.length - 1; i >= 0; i--) {

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