mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Update the build
This commit is contained in:
41
dist/leaflet.markercluster-src.js
vendored
41
dist/leaflet.markercluster-src.js
vendored
@@ -497,7 +497,7 @@ L.MarkerClusterGroup.include(!L.DomUtil.TRANSITION ? {
|
|||||||
this._forceLayout();
|
this._forceLayout();
|
||||||
this._animationStart();
|
this._animationStart();
|
||||||
|
|
||||||
layer._setPos(this._map.latLngToLayerPoint(layer.getLatLng()));
|
layer._setPos(this._map.latLngToLayerPoint(newCluster.getLatLng()));
|
||||||
layer.setOpacity(0);
|
layer.setOpacity(0);
|
||||||
|
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
@@ -1183,17 +1183,20 @@ L.MarkerCluster.include(!L.DomUtil.TRANSITION ? {
|
|||||||
_animationSpiderfy: function (childMarkers, positions) {
|
_animationSpiderfy: function (childMarkers, positions) {
|
||||||
var group = this._group,
|
var group = this._group,
|
||||||
map = group._map,
|
map = group._map,
|
||||||
i, m, leg;
|
i, m, leg, newPos;
|
||||||
|
|
||||||
for (i = childMarkers.length - 1; i >= 0; i--) {
|
for (i = childMarkers.length - 1; i >= 0; i--) {
|
||||||
|
newPos = map.layerPointToLatLng(positions[i]);
|
||||||
m = childMarkers[i];
|
m = childMarkers[i];
|
||||||
|
|
||||||
|
m._preSpiderfyLatlng = m._latlng;
|
||||||
|
m.setLatLng(newPos);
|
||||||
m.setZIndexOffset(1000000); //Make these appear on top of EVERYTHING
|
m.setZIndexOffset(1000000); //Make these appear on top of EVERYTHING
|
||||||
|
|
||||||
L.FeatureGroup.prototype.addLayer.call(group, m);
|
L.FeatureGroup.prototype.addLayer.call(group, m);
|
||||||
m._setPos(positions[i]);
|
|
||||||
|
|
||||||
|
|
||||||
leg = new L.Polyline([this._latlng, map.layerPointToLatLng(positions[i])], { weight: 1.5, color: '#222' });
|
leg = new L.Polyline([this._latlng, newPos], { weight: 1.5, color: '#222' });
|
||||||
map.addLayer(leg);
|
map.addLayer(leg);
|
||||||
m._spiderLeg = leg;
|
m._spiderLeg = leg;
|
||||||
}
|
}
|
||||||
@@ -1210,11 +1213,12 @@ L.MarkerCluster.include(!L.DomUtil.TRANSITION ? {
|
|||||||
for (i = childMarkers.length - 1; i >= 0; i--) {
|
for (i = childMarkers.length - 1; i >= 0; i--) {
|
||||||
m = childMarkers[i];
|
m = childMarkers[i];
|
||||||
|
|
||||||
delete m._backupPosSpider;
|
|
||||||
m.setZIndexOffset(0);
|
|
||||||
|
|
||||||
L.FeatureGroup.prototype.removeLayer.call(group, m);
|
L.FeatureGroup.prototype.removeLayer.call(group, m);
|
||||||
|
|
||||||
|
m.setLatLng(m._preSpiderfyLatlng);
|
||||||
|
delete m._preSpiderfyLatlng;
|
||||||
|
m.setZIndexOffset(0);
|
||||||
|
|
||||||
map.removeLayer(m._spiderLeg);
|
map.removeLayer(m._spiderLeg);
|
||||||
delete m._spiderLeg;
|
delete m._spiderLeg;
|
||||||
}
|
}
|
||||||
@@ -1226,8 +1230,9 @@ L.MarkerCluster.include(!L.DomUtil.TRANSITION ? {
|
|||||||
group = this._group,
|
group = this._group,
|
||||||
map = group._map,
|
map = group._map,
|
||||||
thisLayerPos = map.latLngToLayerPoint(this._latlng),
|
thisLayerPos = map.latLngToLayerPoint(this._latlng),
|
||||||
i, m, leg;
|
i, m, leg, newPos;
|
||||||
|
|
||||||
|
//Add markers to map hidden at our center point
|
||||||
for (i = childMarkers.length - 1; i >= 0; i--) {
|
for (i = childMarkers.length - 1; i >= 0; i--) {
|
||||||
m = childMarkers[i];
|
m = childMarkers[i];
|
||||||
|
|
||||||
@@ -1239,7 +1244,7 @@ L.MarkerCluster.include(!L.DomUtil.TRANSITION ? {
|
|||||||
m._setPos(thisLayerPos);
|
m._setPos(thisLayerPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
this._group._forceLayout();
|
group._forceLayout();
|
||||||
group._animationStart();
|
group._animationStart();
|
||||||
|
|
||||||
var initialLegOpacity = L.Browser.svg ? 0 : 0.3,
|
var initialLegOpacity = L.Browser.svg ? 0 : 0.3,
|
||||||
@@ -1247,14 +1252,17 @@ L.MarkerCluster.include(!L.DomUtil.TRANSITION ? {
|
|||||||
|
|
||||||
|
|
||||||
for (i = childMarkers.length - 1; i >= 0; i--) {
|
for (i = childMarkers.length - 1; i >= 0; i--) {
|
||||||
|
newPos = map.layerPointToLatLng(positions[i]);
|
||||||
m = childMarkers[i];
|
m = childMarkers[i];
|
||||||
|
|
||||||
m._setPos(positions[i]);
|
//Move marker to new position
|
||||||
|
m._preSpiderfyLatlng = m._latlng;
|
||||||
|
m.setLatLng(newPos);
|
||||||
m.setOpacity(1);
|
m.setOpacity(1);
|
||||||
//Add Legs. TODO: Fade this in!
|
|
||||||
|
|
||||||
leg = new L.Polyline([me._latlng, map.layerPointToLatLng(positions[i])], { weight: 1.5, color: '#222', opacity: initialLegOpacity });
|
|
||||||
|
//Add Legs.
|
||||||
|
leg = new L.Polyline([me._latlng, newPos], { weight: 1.5, color: '#222', opacity: initialLegOpacity });
|
||||||
map.addLayer(leg);
|
map.addLayer(leg);
|
||||||
m._spiderLeg = leg;
|
m._spiderLeg = leg;
|
||||||
|
|
||||||
@@ -1327,6 +1335,10 @@ L.MarkerCluster.include(!L.DomUtil.TRANSITION ? {
|
|||||||
for (i = childMarkers.length - 1; i >= 0; i--) {
|
for (i = childMarkers.length - 1; i >= 0; i--) {
|
||||||
m = childMarkers[i];
|
m = childMarkers[i];
|
||||||
|
|
||||||
|
//Fix up the location to the real one
|
||||||
|
m.setLatLng(m._preSpiderfyLatlng);
|
||||||
|
delete m._preSpiderfyLatlng;
|
||||||
|
//Hack override the location to be our center
|
||||||
m._setPos(thisLayerPos);
|
m._setPos(thisLayerPos);
|
||||||
|
|
||||||
m.setOpacity(0);
|
m.setOpacity(0);
|
||||||
@@ -1411,8 +1423,11 @@ L.MarkerClusterGroup.include({
|
|||||||
_unspiderfyLayer: function (layer) {
|
_unspiderfyLayer: function (layer) {
|
||||||
if (layer._spiderLeg) {
|
if (layer._spiderLeg) {
|
||||||
L.FeatureGroup.prototype.removeLayer.call(this, layer);
|
L.FeatureGroup.prototype.removeLayer.call(this, layer);
|
||||||
|
|
||||||
layer.setOpacity(1);
|
layer.setOpacity(1);
|
||||||
|
//Position will be fixed up immediately in _animationUnspiderfy
|
||||||
layer.setZIndexOffset(0);
|
layer.setZIndexOffset(0);
|
||||||
|
|
||||||
this._map.removeLayer(layer._spiderLeg);
|
this._map.removeLayer(layer._spiderLeg);
|
||||||
delete layer._spiderLeg;
|
delete layer._spiderLeg;
|
||||||
}
|
}
|
||||||
|
|||||||
2
dist/leaflet.markercluster.js
vendored
2
dist/leaflet.markercluster.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user