[Pkg-javascript-commits] [leaflet-markercluster] 10/128: We weren't using the chunked option, fixed.

Jonas Smedegaard dr at jones.dk
Sun Apr 16 06:25:58 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 517ba04fc42736e74e6db500f28a169a7a6b262b
Author: danzel <danzel at localhost.geek.nz>
Date:   Fri Jan 31 09:04:17 2014 +1300

    We weren't using the chunked option, fixed.
---
 src/MarkerClusterGroup.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/MarkerClusterGroup.js b/src/MarkerClusterGroup.js
index 6b6c13b..545fdfe 100644
--- a/src/MarkerClusterGroup.js
+++ b/src/MarkerClusterGroup.js
@@ -162,6 +162,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
 	addLayers: function (layersArray) {
 		var fg = this._featureGroup,
 			npg = this._nonPointGroup,
+			chunked = this.options.chunkedLoading,
 			chunkInterval = this.options.chunkInterval,
 			chunkProgress = this.options.chunkProgress,
 			newMarkers, i, l, m;
@@ -172,7 +173,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
 			var process = L.bind(function () {
 				var start = (new Date()).getTime();
 				for (; offset < layersArray.length; offset++) {
-					if (offset % 200 === 0) {
+					if (chunked && offset % 200 === 0) {
 						// every couple hundred markers, instrument the time elapsed since processing started:
 						var elapsed = (new Date()).getTime() - start;
 						if (elapsed > chunkInterval) {

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