Skip to content

Commit 9feb26e

Browse files
Add option to disable cluster animation (#832)
* Add option to disable cluster animation * Update en.json
1 parent 3c7c8f9 commit 9feb26e

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

i18n/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@
146146
"maps-googlemaps3-par-clustergridsize": "The grid size of a cluster in pixels.",
147147
"maps-par-clustermaxzoom": "The maximum zoom level where clusters may exist.",
148148
"maps-par-clusterzoomonclick": "Whether the default behaviour of clicking on a cluster is to zoom into it.",
149+
"maps-par-clusteranimate": "Whether to enable smooth transitions when zooming and spiderfying.",
149150
"maps-par-maxclusterradius": "The maximum radius that a cluster will cover.",
150151
"maps-googlemaps3-par-clusteraveragecenter": "Whether the center of each cluster should be the average of all markers in the cluster.",
151152
"maps-googlemaps3-par-clusterminsize": "The minimum number of markers to be in a cluster before the markers are hidden and a count is shown.",

resources/leaflet/LeafletCluster.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
maxClusterRadius: options.clustermaxradius,
1111
disableClusteringAtZoom: options.clustermaxzoom + 1,
1212
zoomToBoundsOnClick: options.clusterzoomonclick,
13+
animate: options.clusteranimate,
1314
spiderfyOnMaxZoom: options.clusterspiderfy,
1415
iconCreateFunction: function(cluster) {
1516
var childCount = cluster.getChildCount();

src/LeafletService.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,12 @@ public function getParameterInfo(): array {
112112
'message' => 'maps-par-clusterzoomonclick',
113113
];
114114

115+
$params['clusteranimate'] = [
116+
'type' => ParameterTypes::BOOLEAN,
117+
'default' => true,
118+
'message' => 'maps-par-clusteranimate',
119+
];
120+
115121
$params['clustermaxradius'] = [
116122
'type' => ParameterTypes::INTEGER,
117123
'default' => 80,

0 commit comments

Comments
 (0)