From 8b5e36e9b008fd058aab568bfa9cc9ae89dd49da Mon Sep 17 00:00:00 2001 From: Matthew Petroff Date: Wed, 3 Oct 2018 20:23:53 -0400 Subject: [PATCH] When setting view via API, reset timer for auto rotate (fixes #664). --- src/js/pannellum.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/js/pannellum.js b/src/js/pannellum.js index f233249..895a9da 100644 --- a/src/js/pannellum.js +++ b/src/js/pannellum.js @@ -2399,6 +2399,7 @@ this.setPitch = function(pitch, animated, callback, callbackArgs) { } else { config.pitch = pitch; } + latestInteraction = Date.now(); animateInit(); return this; }; @@ -2467,6 +2468,7 @@ this.setYaw = function(yaw, animated, callback, callbackArgs) { } else { config.yaw = yaw; } + latestInteraction = Date.now(); animateInit(); return this; }; @@ -2528,6 +2530,7 @@ this.setHfov = function(hfov, animated, callback, callbackArgs) { } else { setHfov(hfov); } + latestInteraction = Date.now(); animateInit(); return this; };