From 83084e892cc3dc0bedc53307fabe6db6acc93937 Mon Sep 17 00:00:00 2001 From: Matthew Petroff Date: Thu, 4 Jul 2024 19:15:38 -0400 Subject: [PATCH] Ignore `autoRotateInactivityDelay` if `autoRotate` isn't set (#1222). --- src/js/pannellum.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/pannellum.js b/src/js/pannellum.js index 050f8423..13db7060 100644 --- a/src/js/pannellum.js +++ b/src/js/pannellum.js @@ -1552,7 +1552,7 @@ function animate() { prevTime = undefined; var autoRotateStartTime = config.autoRotateInactivityDelay - (Date.now() - latestInteraction); - if (autoRotateStartTime > 0) { + if (autoRotateStartTime > 0 && autoRotateSpeed) { autoRotateStart = setTimeout(function() { config.autoRotate = autoRotateSpeed; _this.lookAt(origPitch, undefined, origHfov, 3000);