forked from Snck3rs/contao-leaflet-libraries
Update Leaflet.markercluster to version 1.4.1
This commit is contained in:
@@ -14,7 +14,7 @@ This package contains following packages:
|
|||||||
|
|
||||||
- [leaflet 1.7.1](http://leafletjs.com)
|
- [leaflet 1.7.1](http://leafletjs.com)
|
||||||
- [Leaflet-providers 1.3.1](http://leaflet-extras.github.io/leaflet-providers)
|
- [Leaflet-providers 1.3.1](http://leaflet-extras.github.io/leaflet-providers)
|
||||||
- [Leaflet.markercluster 1.4.0](https://github.com/Leaflet/Leaflet.markercluster)
|
- [Leaflet.markercluster 1.4.1](https://github.com/Leaflet/Leaflet.markercluster)
|
||||||
- [Leaflet-omnivore 0.3.4](https://github.com/mapbox/leaflet-omnivore)
|
- [Leaflet-omnivore 0.3.4](https://github.com/mapbox/leaflet-omnivore)
|
||||||
- [Leaflet.loading 0.1.24](https://github.com/ebrelsford/Leaflet.loading)
|
- [Leaflet.loading 0.1.24](https://github.com/ebrelsford/Leaflet.loading)
|
||||||
- [Leaflet.Control.FullScreen 1.4.5](https://github.com/brunob/leaflet.fullscreen)
|
- [Leaflet.Control.FullScreen 1.4.5](https://github.com/brunob/leaflet.fullscreen)
|
||||||
|
|||||||
@@ -48,8 +48,8 @@ removed link to h1 and indented back 2 spaces all links.
|
|||||||
|
|
||||||
## Using the plugin
|
## Using the plugin
|
||||||
Include the plugin CSS and JS files on your page after Leaflet files, using your method of choice:
|
Include the plugin CSS and JS files on your page after Leaflet files, using your method of choice:
|
||||||
* [Download the `v1.4.0` release](https://github.com/Leaflet/Leaflet.markercluster/archive/v1.4.0.zip)
|
* [Download the `v1.4.1` release](https://github.com/Leaflet/Leaflet.markercluster/archive/v1.4.1.zip)
|
||||||
* Use unpkg CDN: `https://unpkg.com/leaflet.markercluster@1.4.0/dist/`
|
* Use unpkg CDN: `https://unpkg.com/leaflet.markercluster@1.4.1/dist/`
|
||||||
* Install with npm: `npm install leaflet.markercluster`
|
* Install with npm: `npm install leaflet.markercluster`
|
||||||
|
|
||||||
In each case, use files in the `dist` folder:
|
In each case, use files in the `dist` folder:
|
||||||
@@ -256,7 +256,7 @@ markers.on('clusterclick', function (a) {
|
|||||||
|
|
||||||
#### Other clusters methods
|
#### Other clusters methods
|
||||||
* **getChildCount**: Returns the total number of markers contained within that cluster.
|
* **getChildCount**: Returns the total number of markers contained within that cluster.
|
||||||
* **getAllChildMarkers**: Returns the array of total markers contained within that cluster.
|
* **getAllChildMarkers(storage: array | undefined, ignoreDraggedMarker: boolean | undefined)**: Returns an array of all markers contained within this cluster (storage will be used if provided). If ignoreDraggedMarker is true and there is currently a marker dragged, the dragged marker will not be included in the array.
|
||||||
* **spiderfy**: Spiderfies the child markers of this cluster
|
* **spiderfy**: Spiderfies the child markers of this cluster
|
||||||
* **unspiderfy**: Unspiderfies a cluster (opposite of spiderfy)
|
* **unspiderfy**: Unspiderfies a cluster (opposite of spiderfy)
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Leaflet.markercluster 1.4.0+master.458cf75,
|
* Leaflet.markercluster 1.4.1+master.37ab9a2,
|
||||||
* Provides Beautiful Animated Marker Clustering functionality for Leaflet, a JS library for interactive maps.
|
* Provides Beautiful Animated Marker Clustering functionality for Leaflet, a JS library for interactive maps.
|
||||||
* https://github.com/Leaflet/Leaflet.markercluster
|
* https://github.com/Leaflet/Leaflet.markercluster
|
||||||
* (c) 2012-2017, Dave Leaver, smartrak
|
* (c) 2012-2017, Dave Leaver, smartrak
|
||||||
@@ -720,10 +720,11 @@ var MarkerClusterGroup = L.MarkerClusterGroup = L.FeatureGroup.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_childMarkerDragEnd: function (e) {
|
_childMarkerDragEnd: function (e) {
|
||||||
if (e.target.__dragStart) {
|
var dragStart = e.target.__dragStart;
|
||||||
this._moveChild(e.target, e.target.__dragStart, e.target._latlng);
|
|
||||||
}
|
|
||||||
delete e.target.__dragStart;
|
delete e.target.__dragStart;
|
||||||
|
if (dragStart) {
|
||||||
|
this._moveChild(e.target, dragStart, e.target._latlng);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
@@ -1412,7 +1413,7 @@ var MarkerCluster = L.MarkerCluster = L.Marker.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
//Recursively retrieve all child markers of this cluster
|
//Recursively retrieve all child markers of this cluster
|
||||||
getAllChildMarkers: function (storageArray) {
|
getAllChildMarkers: function (storageArray, ignoreDraggedMarker) {
|
||||||
storageArray = storageArray || [];
|
storageArray = storageArray || [];
|
||||||
|
|
||||||
for (var i = this._childClusters.length - 1; i >= 0; i--) {
|
for (var i = this._childClusters.length - 1; i >= 0; i--) {
|
||||||
@@ -1420,6 +1421,9 @@ var MarkerCluster = L.MarkerCluster = L.Marker.extend({
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (var j = this._markers.length - 1; j >= 0; j--) {
|
for (var j = this._markers.length - 1; j >= 0; j--) {
|
||||||
|
if (ignoreDraggedMarker && this._markers[j].__dragStart) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
storageArray.push(this._markers[j]);
|
storageArray.push(this._markers[j]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2113,7 +2117,7 @@ L.MarkerCluster.include({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var childMarkers = this.getAllChildMarkers(),
|
var childMarkers = this.getAllChildMarkers(null, true),
|
||||||
group = this._group,
|
group = this._group,
|
||||||
map = group._map,
|
map = group._map,
|
||||||
center = map.latLngToLayerPoint(this._latlng),
|
center = map.latLngToLayerPoint(this._latlng),
|
||||||
@@ -2191,7 +2195,7 @@ L.MarkerCluster.include({
|
|||||||
var group = this._group,
|
var group = this._group,
|
||||||
map = group._map,
|
map = group._map,
|
||||||
fg = group._featureGroup,
|
fg = group._featureGroup,
|
||||||
childMarkers = this.getAllChildMarkers(),
|
childMarkers = this.getAllChildMarkers(null, true),
|
||||||
m, i;
|
m, i;
|
||||||
|
|
||||||
group._ignoreMove = true;
|
group._ignoreMove = true;
|
||||||
@@ -2384,7 +2388,7 @@ L.MarkerCluster.include({
|
|||||||
map = group._map,
|
map = group._map,
|
||||||
fg = group._featureGroup,
|
fg = group._featureGroup,
|
||||||
thisLayerPos = zoomDetails ? map._latLngToNewLayerPoint(this._latlng, zoomDetails.zoom, zoomDetails.center) : map.latLngToLayerPoint(this._latlng),
|
thisLayerPos = zoomDetails ? map._latLngToNewLayerPoint(this._latlng, zoomDetails.zoom, zoomDetails.center) : map.latLngToLayerPoint(this._latlng),
|
||||||
childMarkers = this.getAllChildMarkers(),
|
childMarkers = this.getAllChildMarkers(null, true),
|
||||||
svg = L.Path.SVG,
|
svg = L.Path.SVG,
|
||||||
m, i, leg, legPath, legLength, nonAnimatable;
|
m, i, leg, legPath, legLength, nonAnimatable;
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "leaflet.markercluster",
|
"name": "leaflet.markercluster",
|
||||||
"repository": "https://github.com/Leaflet/Leaflet.markercluster",
|
"repository": "https://github.com/Leaflet/Leaflet.markercluster",
|
||||||
"version": "1.4.0",
|
"version": "1.4.1",
|
||||||
"description": "Provides Beautiful Animated Marker Clustering functionality for Leaflet",
|
"description": "Provides Beautiful Animated Marker Clustering functionality for Leaflet",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"git-rev-sync": "^1.8.0",
|
"git-rev-sync": "^1.8.0",
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ $GLOBALS['LEAFLET_LIBRARIES']['leaflet-providers'] = array
|
|||||||
$GLOBALS['LEAFLET_LIBRARIES']['leaflet-markercluster'] = array
|
$GLOBALS['LEAFLET_LIBRARIES']['leaflet-markercluster'] = array
|
||||||
(
|
(
|
||||||
'name' => 'Leaflet.markercluster',
|
'name' => 'Leaflet.markercluster',
|
||||||
'version' => '1.4.0',
|
'version' => '1.4.1',
|
||||||
'license' => '<a href="https://github.com/Leaflet/Leaflet.markercluster/blob/master/MIT-LICENCE.txt" target="_blank">MIT</a>',
|
'license' => '<a href="https://github.com/Leaflet/Leaflet.markercluster/blob/master/MIT-LICENCE.txt" target="_blank">MIT</a>',
|
||||||
'homepage' => 'https://github.com/Leaflet/Leaflet.markercluster',
|
'homepage' => 'https://github.com/Leaflet/Leaflet.markercluster',
|
||||||
'css' => 'assets/leaflet/libs/leaflet-markercluster/MarkerCluster.css',
|
'css' => 'assets/leaflet/libs/leaflet-markercluster/MarkerCluster.css',
|
||||||
|
|||||||
Reference in New Issue
Block a user