Bladeren bron

Fix for #516

pull/723/head
Gareth Hay 5 jaren geleden
bovenliggende
commit
9260733fd3
1 gewijzigde bestanden met toevoegingen van 3 en 3 verwijderingen
  1. +3
    -3
      src/js/pannellum.js

+ 3
- 3
src/js/pannellum.js Bestand weergeven

@@ -2471,7 +2471,7 @@ this.setYaw = function(yaw, animated, callback, callbackArgs) {
return this;
}
animated = animated == undefined ? 1000: Number(animated);
yaw = ((yaw + 180) % 360) - 180 // Keep in bounds
yaw = (yaw>180)?yaw-360:(yaw<-180)?yaw=yaw+360:yaw;
if (animated) {
// Animate in shortest direction
if (config.yaw - yaw > 180)
@@ -2482,13 +2482,13 @@ this.setYaw = function(yaw, animated, callback, callbackArgs) {
animatedMove.yaw = {
'startTime': Date.now(),
'startPosition': config.yaw,
'endPosition': yaw,
'endPosition': parseFloat(yaw),
'duration': animated
}
if (typeof callback == 'function')
setTimeout(function(){callback(callbackArgs)}, animated);
} else {
config.yaw = yaw;
config.yaw = parseFloat(yaw);
}
animateInit();
return this;


Laden…
Annuleren
Opslaan