@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.
- package/dist/leaflet-elevation.css +0 -4
- package/dist/leaflet-elevation.js +6 -2
- package/dist/leaflet-elevation.js.map +1 -1
- package/dist/leaflet-elevation.min.css +1 -1
- package/dist/leaflet-elevation.min.js +1 -1
- package/dist/leaflet-elevation.min.js.map +1 -1
- package/package.json +1 -1
- package/src/chart.js +4 -1
- package/src/control.js +1 -1
- package/src/index.css +0 -4
package/package.json
CHANGED
package/src/chart.js
CHANGED
|
@@ -214,6 +214,7 @@ export var Chart = L.Class.extend({
|
|
|
214
214
|
this._updateScale(); // hacky way for restoring x scale when zooming out
|
|
215
215
|
this.zooming = true;
|
|
216
216
|
this._scales.distance = this._x = e.transform.rescaleX(this._x); // calculate x scale at zoom level
|
|
217
|
+
if (this._scales.time) this._scales.time = e.transform.rescaleX(this._scales.time); // calculate x scale at zoom level
|
|
217
218
|
this._resetDrag();
|
|
218
219
|
if (e.sourceEvent && e.sourceEvent.type == "mousemove") {
|
|
219
220
|
this._hideDiagramIndicator();
|
|
@@ -374,7 +375,9 @@ export var Chart = L.Class.extend({
|
|
|
374
375
|
let opts = this.options;
|
|
375
376
|
let scale = props.scale;
|
|
376
377
|
|
|
377
|
-
if (typeof
|
|
378
|
+
if (typeof this._scales[props.name] === 'function') {
|
|
379
|
+
props.scale = this._scales[props.name]; // retrieve cached scale
|
|
380
|
+
} else if (typeof scale !== 'function') {
|
|
378
381
|
scale = L.extend({
|
|
379
382
|
data : this._data,
|
|
380
383
|
forceBounds: opts.forceAxisBounds
|
package/src/control.js
CHANGED
|
@@ -17,7 +17,7 @@ export const Elevation = L.Control.Elevation = L.Control.extend({
|
|
|
17
17
|
__TOGEOJSON: 'https://unpkg.com/@tmcw/togeojson@4.3.0/dist/togeojson.umd.js',
|
|
18
18
|
__LGEOMUTIL: 'https://unpkg.com/leaflet-geometryutil@0.9.3/src/leaflet.geometryutil.js',
|
|
19
19
|
__LALMOSTOVER: 'https://unpkg.com/leaflet-almostover@1.0.1/src/leaflet.almostover.js',
|
|
20
|
-
__LDISTANCEM: 'https://unpkg.com/@raruto/leaflet-elevation@1.8.
|
|
20
|
+
__LDISTANCEM: 'https://unpkg.com/@raruto/leaflet-elevation@1.8.4/libs/leaflet-distance-marker.min.js',
|
|
21
21
|
|
|
22
22
|
/*
|
|
23
23
|
* Add data to the diagram either from GPX or GeoJSON and update the axis domain and data
|
package/src/index.css
CHANGED