@raruto/leaflet-elevation 1.9.5 → 1.9.6

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.
@@ -1820,7 +1820,7 @@
1820
1820
  __TOGEOJSON: 'https://unpkg.com/@tmcw/togeojson@4.5.0/dist/togeojson.umd.js',
1821
1821
  __LGEOMUTIL: 'https://unpkg.com/leaflet-geometryutil@0.9.3/src/leaflet.geometryutil.js',
1822
1822
  __LALMOSTOVER: 'https://unpkg.com/leaflet-almostover@1.0.1/src/leaflet.almostover.js',
1823
- __LDISTANCEM: 'https://unpkg.com/@raruto/leaflet-elevation@1.9.5/libs/leaflet-distance-marker.min.js',
1823
+ __LDISTANCEM: 'https://unpkg.com/@raruto/leaflet-elevation@1.9.6/libs/leaflet-distance-marker.min.js',
1824
1824
 
1825
1825
  /*
1826
1826
  * Add data to the diagram either from GPX or GeoJSON and update the axis domain and data
@@ -3374,19 +3374,20 @@
3374
3374
  } else {
3375
3375
  point.meta.time = new Date(Date.now());
3376
3376
  }
3377
- } // Handle timezone offset
3377
+ }
3378
3378
 
3379
+ var time = point.meta.time; // Handle timezone offset
3379
3380
 
3380
- if (point.meta.time.getTime() - point.meta.time.getTimezoneOffset() * 60 * 1000 === 0) {
3381
- point.meta.time = 0;
3381
+ if (time.getTime() - time.getTimezoneOffset() * 60 * 1000 === 0) {
3382
+ time = 0;
3382
3383
  }
3383
3384
 
3384
- return point.meta.time.getTime();
3385
+ return time;
3385
3386
  },
3386
3387
  update: function update(time, i) {
3387
3388
  this.track_info.time = (this.track_info.time || 0) + Math.abs(this._data[i].time - this._data[i > 0 ? i - 1 : i].time);
3388
3389
  this._data[i].duration = this.track_info.time;
3389
- return new Date(time);
3390
+ return time;
3390
3391
  }
3391
3392
  });
3392
3393