From 6cf5532ba16a1af97400c366b925a1cfb0c1f473 Mon Sep 17 00:00:00 2001 From: Matthew Petroff Date: Sat, 2 Jul 2016 21:06:35 -0400 Subject: [PATCH] Stop motion on scene changes (only affects API-initiated changes). --- src/js/pannellum.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/js/pannellum.js b/src/js/pannellum.js index 685a23e..778bad3 100644 --- a/src/js/pannellum.js +++ b/src/js/pannellum.js @@ -1865,7 +1865,10 @@ function loadScene(sceneId, targetPitch, targetYaw, targetHfov, fadeDone) { // Create the new config for the scene mergeConfig(sceneId); - + + // Stop motion + yawSpeed = pitchSpeed = zoomSpeed = 0; + // Reload scene processOptions(); if (workingPitch !== undefined) {