@raruto/leaflet-elevation 1.8.3 → 1.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -36,10 +36,6 @@
36
36
  user-select: none;
37
37
  }
38
38
 
39
- .elevation-control.elevation .background.zoomed .axis.time {
40
- display: none;
41
- }
42
-
43
39
  .elevation-control.elevation .axis line,
44
40
  .elevation-control.elevation .axis path {
45
41
  stroke: #2D1130;
@@ -1317,6 +1317,8 @@
1317
1317
  _this4.zooming = true;
1318
1318
  _this4._scales.distance = _this4._x = e.transform.rescaleX(_this4._x); // calculate x scale at zoom level
1319
1319
 
1320
+ if (_this4._scales.time) _this4._scales.time = e.transform.rescaleX(_this4._scales.time); // calculate x scale at zoom level
1321
+
1320
1322
  _this4._resetDrag();
1321
1323
 
1322
1324
  if (e.sourceEvent && e.sourceEvent.type == "mousemove") {
@@ -1479,7 +1481,9 @@
1479
1481
  var opts = this.options;
1480
1482
  var scale = props.scale;
1481
1483
 
1482
- if (typeof scale !== 'function') {
1484
+ if (typeof this._scales[props.name] === 'function') {
1485
+ props.scale = this._scales[props.name]; // retrieve cached scale
1486
+ } else if (typeof scale !== 'function') {
1483
1487
  scale = L.extend({
1484
1488
  data: this._data,
1485
1489
  forceBounds: opts.forceAxisBounds
@@ -2057,7 +2061,7 @@
2057
2061
  __TOGEOJSON: 'https://unpkg.com/@tmcw/togeojson@4.3.0/dist/togeojson.umd.js',
2058
2062
  __LGEOMUTIL: 'https://unpkg.com/leaflet-geometryutil@0.9.3/src/leaflet.geometryutil.js',
2059
2063
  __LALMOSTOVER: 'https://unpkg.com/leaflet-almostover@1.0.1/src/leaflet.almostover.js',
2060
- __LDISTANCEM: 'https://unpkg.com/@raruto/leaflet-elevation@1.8.3/libs/leaflet-distance-marker.min.js',
2064
+ __LDISTANCEM: 'https://unpkg.com/@raruto/leaflet-elevation@1.8.4/libs/leaflet-distance-marker.min.js',
2061
2065
 
2062
2066
  /*
2063
2067
  * Add data to the diagram either from GPX or GeoJSON and update the axis domain and data