Browse Source

fixed bug when firing animatefinished

pull/880/head
NiHoel 6 years ago
parent
commit
f50398ed67
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      src/js/pannellum.js

+ 2
- 1
src/js/pannellum.js View File

@@ -1409,7 +1409,8 @@ function animate() {
} else if (renderer && (renderer.isLoading() || (config.dynamic === true && update))) {
requestAnimationFrame(animate);
} else {
fireEvent('animatefinished', {pitch: _this.getPitch(), yaw: _this.getYaw(), hfov: _this.getHfov()});
if (_this.getPitch && _this.getYaw && _this.getHfov)
fireEvent('animatefinished', {pitch: _this.getPitch(), yaw: _this.getYaw(), hfov: _this.getHfov()});
animating = false;
prevTime = undefined;
var autoRotateStartTime = config.autoRotateInactivityDelay -


Loading…
Cancel
Save