proximiio-js-library 1.11.39 → 1.11.40

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.
@@ -2522,7 +2522,12 @@ export class Map {
2522
2522
  }
2523
2523
  }
2524
2524
  onRestartRouteAnimation(delay) {
2525
+ var _a;
2525
2526
  if (this.defaultOptions.routeAnimation.type === 'point' || this.defaultOptions.routeAnimation.type === 'puck') {
2527
+ const route = this.routingSource.route[`path-part-${this.currentStep}`] &&
2528
+ ((_a = this.routingSource.route[`path-part-${this.currentStep}`].properties) === null || _a === void 0 ? void 0 : _a.level) === this.state.floor.level
2529
+ ? this.routingSource.route[`path-part-${this.currentStep}`]
2530
+ : lineString(this.routingSource.levelPoints[this.state.floor.level].map((i) => i.geometry.coordinates), { level: this.state.floor.level });
2526
2531
  clearInterval(this.animationInterval);
2527
2532
  // @ts-ignore
2528
2533
  this.map.getSource('pointAlong').setData({
@@ -2534,6 +2539,10 @@ export class Map {
2534
2539
  type: 'FeatureCollection',
2535
2540
  features: [],
2536
2541
  });
2542
+ this.map.jumpTo({
2543
+ center: route.geometry.coordinates[0],
2544
+ });
2545
+ this.map.setStyle(this.state.style);
2537
2546
  }
2538
2547
  setTimeout(() => {
2539
2548
  this.animateRoute();