globe.gl 2.45.3 → 2.46.0

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/globe.gl.mjs CHANGED
@@ -411,6 +411,11 @@ var globe = Kapsule({
411
411
  return finalGeoCoords[p] = +finalGeoCoords[p];
412
412
  }); // coerce coords to number
413
413
 
414
+ if (state.povTween) {
415
+ // cancel any ongoing pov animation
416
+ state.povTween.end();
417
+ state.povTween = undefined;
418
+ }
414
419
  if (!transitionDuration) {
415
420
  // no animation
416
421
  setCameraPos(finalGeoCoords);
@@ -418,7 +423,8 @@ var globe = Kapsule({
418
423
  // Avoid rotating more than 180deg longitude
419
424
  while (curGeoCoords.lng - finalGeoCoords.lng > 180) curGeoCoords.lng -= 360;
420
425
  while (curGeoCoords.lng - finalGeoCoords.lng < -180) curGeoCoords.lng += 360;
421
- state.tweenGroup.add(new Tween(curGeoCoords).to(finalGeoCoords, transitionDuration).easing(Easing.Cubic.InOut).onUpdate(setCameraPos).onComplete(function () {
426
+ state.tweenGroup.add(state.povTween = new Tween(curGeoCoords).to(finalGeoCoords, transitionDuration).easing(Easing.Cubic.InOut).onUpdate(setCameraPos).onComplete(function () {
427
+ state.povTween = undefined;
422
428
  state.tweenGroup.remove(this);
423
429
  }).start());
424
430
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "globe.gl",
3
- "version": "2.45.3",
3
+ "version": "2.46.0",
4
4
  "description": "UI component for Globe Data Visualization using ThreeJS/WebGL",
5
5
  "type": "module",
6
6
  "unpkg": "dist/globe.gl.min.js",