[Pkg-javascript-commits] [leaflet-markercluster] 26/31: Rename option for clarity

Jonas Smedegaard dr at jones.dk
Sun Oct 22 17:29:31 UTC 2017


This is an automated email from the git hooks/post-receive script.

js pushed a commit to annotated tag upstream/1.1.0_dfsg
in repository leaflet-markercluster.

commit f80ee8bce32dc32fb0d21c38da4baf061413df26
Author: ckrahe <chris at krahe.org>
Date:   Wed Aug 23 10:18:35 2017 -0400

    Rename option for clarity
---
 README.md                           | 2 +-
 example/marker-clustering-pane.html | 2 +-
 spec/suites/PaneSpec.js             | 2 +-
 src/MarkerCluster.js                | 4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/README.md b/README.md
index b8e9052..f79edc2 100644
--- a/README.md
+++ b/README.md
@@ -130,7 +130,7 @@ If you need to update the clusters icon (e.g. they are based on markers real-tim
 * **spiderLegPolylineOptions**: Allows you to specify [PolylineOptions](http://leafletjs.com/reference.html#polyline-options) to style spider legs. By default, they are `{ weight: 1.5, color: '#222', opacity: 0.5 }`.
 * **spiderfyDistanceMultiplier**: Increase from 1 to increase the distance away from the center that spiderfied markers are placed. Use if you are using big marker icons (Default: 1).
 * **iconCreateFunction**: Function used to create the cluster icon. See [the default implementation](https://github.com/Leaflet/Leaflet.markercluster/blob/15ed12654acdc54a4521789c498e4603fe4bf781/src/MarkerClusterGroup.js#L542) or the [custom example](https://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-custom.html).
-* **mapPane**: Map pane where the cluster icons will be added. Defaults to markerPane. [See the pane example](https://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-pane.html).
+* **clusterPane**: Map pane where the cluster icons will be added. Defaults to markerPane. [See the pane example](https://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-pane.html).
 
 #### Chunked addLayers options
 Options for the [addLayers](#bulk-adding-and-removing-markers) method. See [#357](https://github.com/Leaflet/Leaflet.markercluster/issues/357) for explanation on how the chunking works.
diff --git a/example/marker-clustering-pane.html b/example/marker-clustering-pane.html
index 760456f..505b139 100644
--- a/example/marker-clustering-pane.html
+++ b/example/marker-clustering-pane.html
@@ -62,7 +62,7 @@
                     return L.divIcon({ html: n, className: className, iconSize: L.point(40, 40) });
                 },
                 //Disable all of the defaults & specify the pane:
-                spiderfyOnMaxZoom: false, showCoverageOnHover: false, zoomToBoundsOnClick: false, mapPane: pane
+                spiderfyOnMaxZoom: false, showCoverageOnHover: false, zoomToBoundsOnClick: false, clusterPane: pane
             });
 		    return(mcg);
         }
diff --git a/spec/suites/PaneSpec.js b/spec/suites/PaneSpec.js
index a2221fe..c78fd0b 100644
--- a/spec/suites/PaneSpec.js
+++ b/spec/suites/PaneSpec.js
@@ -64,7 +64,7 @@ describe('Map pane selection', function() {
     /////////////////////////////
 
     it('recognizes and applies option', function() {
-        group = new L.MarkerClusterGroup({mapPane: 'testPane'});
+        group = new L.MarkerClusterGroup({clusterPane: 'testPane'});
 
         var marker = new L.Marker([1.5, 1.5]);
         var marker2 = new L.Marker([1.5, 1.5]);
diff --git a/src/MarkerCluster.js b/src/MarkerCluster.js
index a4487b3..b8db369 100644
--- a/src/MarkerCluster.js
+++ b/src/MarkerCluster.js
@@ -2,8 +2,8 @@ L.MarkerCluster = L.Marker.extend({
 	initialize: function (group, zoom, a, b) {
 
 		var options = { icon: this };
-		if (group.options.mapPane) {
-		    options.pane = group.options.mapPane;
+		if (group.options.clusterPane) {
+		    options.pane = group.options.clusterPane;
         }
 
 		L.Marker.prototype.initialize.call(this, a ? (a._cLatLng || a.getLatLng()) : new L.LatLng(0, 0), options);

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