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.js CHANGED
@@ -1,4 +1,4 @@
1
- // Version 2.45.3 globe.gl - https://github.com/vasturiano/globe.gl
1
+ // Version 2.46.1 globe.gl - https://github.com/vasturiano/globe.gl
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
4
4
  typeof define === 'function' && define.amd ? define(factory) :
@@ -181150,12 +181150,15 @@ var<${access}> ${ name } : ${ structName };`;
181150
181150
  if (geoCoords.lat === undefined && geoCoords.lng === undefined && geoCoords.altitude === undefined) {
181151
181151
  return curGeoCoords;
181152
181152
  } else {
181153
+ var _state$povTween;
181153
181154
  // Setter
181154
181155
  var finalGeoCoords = Object.assign({}, curGeoCoords, geoCoords);
181155
181156
  ['lat', 'lng', 'altitude'].forEach(function (p) {
181156
181157
  return finalGeoCoords[p] = +finalGeoCoords[p];
181157
181158
  }); // coerce coords to number
181158
181159
 
181160
+ (_state$povTween = state.povTween) === null || _state$povTween === void 0 || _state$povTween.end(); // cancel any ongoing pov animation
181161
+
181159
181162
  if (!transitionDuration) {
181160
181163
  // no animation
181161
181164
  setCameraPos(finalGeoCoords);
@@ -181163,7 +181166,8 @@ var<${access}> ${ name } : ${ structName };`;
181163
181166
  // Avoid rotating more than 180deg longitude
181164
181167
  while (curGeoCoords.lng - finalGeoCoords.lng > 180) curGeoCoords.lng -= 360;
181165
181168
  while (curGeoCoords.lng - finalGeoCoords.lng < -180) curGeoCoords.lng += 360;
181166
- state.tweenGroup.add(new Tween(curGeoCoords).to(finalGeoCoords, transitionDuration).easing(Easing.Cubic.InOut).onUpdate(setCameraPos).onComplete(function () {
181169
+ state.tweenGroup.add(state.povTween = new Tween(curGeoCoords).to(finalGeoCoords, transitionDuration).easing(Easing.Cubic.InOut).onUpdate(setCameraPos).onComplete(function () {
181170
+ state.povTween = undefined;
181167
181171
  state.tweenGroup.remove(this);
181168
181172
  }).start());
181169
181173
  }