globe.gl 2.45.3 → 2.46.1

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