@aibee/crc-bmap 0.8.38 → 0.8.39

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/lib/bmap.esm.js CHANGED
@@ -9787,8 +9787,13 @@ var PositionNavigation = class extends EventDispatcher13 {
9787
9787
  }
9788
9788
  pause() {
9789
9789
  var _this_throttleUpdatePosition;
9790
- this.tweenUtil.pause();
9790
+ this.tweenUtil.clear();
9791
9791
  (_this_throttleUpdatePosition = this.throttleUpdatePosition) == null ? void 0 : _this_throttleUpdatePosition.cancel();
9792
+ this.paused = true;
9793
+ }
9794
+ continue() {
9795
+ this.paused = false;
9796
+ this.startCurRouteSimulation();
9792
9797
  }
9793
9798
  startCurRouteSimulation() {
9794
9799
  var _this = this;
@@ -9844,7 +9849,9 @@ var PositionNavigation = class extends EventDispatcher13 {
9844
9849
  }
9845
9850
  changeSimulationSpeed(speed) {
9846
9851
  this.options.simulationSpeed = speed;
9847
- this.startCurRouteSimulation();
9852
+ if (!this.paused) {
9853
+ this.startCurRouteSimulation();
9854
+ }
9848
9855
  }
9849
9856
  getCurRouteRemainDistance() {
9850
9857
  const { curRoutePathPoints, pointIndex, position } = this;
@@ -9965,7 +9972,7 @@ var PositionNavigation = class extends EventDispatcher13 {
9965
9972
  super(), this.navigation = navigation, this.offset = false, this.reset = false, this.position = [
9966
9973
  0,
9967
9974
  0
9968
- ], this.routeIndex = 0, this.pointIndex = 0, this.paths = [], this.timer = new Timer(), this.resetTimer = null, this.tweenUtil = new TweenUtil(), this.onAddPaths = ({ paths }) => {
9975
+ ], this.routeIndex = 0, this.pointIndex = 0, this.paths = [], this.timer = new Timer(), this.resetTimer = null, this.tweenUtil = new TweenUtil(), this.paused = false, this.onAddPaths = ({ paths }) => {
9969
9976
  this.paths = paths;
9970
9977
  this.resetStatus(paths);
9971
9978
  }, this.onUpdate = () => {
@@ -10220,7 +10227,7 @@ var Navigation = class extends Plugin {
10220
10227
  }
10221
10228
  continueAnimation() {
10222
10229
  this.tweenUtil.continue();
10223
- this.positionNavigation.tweenUtil.continue();
10230
+ this.positionNavigation.continue();
10224
10231
  }
10225
10232
  clearTween() {
10226
10233
  this.tweenUtil.clear();