From 9274ed63d7f285bd9e1ddd8b7fff8935adab9121 Mon Sep 17 00:00:00 2001 From: Jonas Petersen Date: Wed, 25 Sep 2024 17:39:31 +0200 Subject: [PATCH] Add missing callback invocations to setPitch, setYaw and setHfov. --- src/js/pannellum.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/js/pannellum.js b/src/js/pannellum.js index 0cc5423..ead7333 100644 --- a/src/js/pannellum.js +++ b/src/js/pannellum.js @@ -2721,6 +2721,8 @@ this.setPitch = function(pitch, animated, callback, callbackArgs) { setTimeout(function(){callback(callbackArgs);}, animated); } else { config.pitch = pitch; + if (typeof callback == 'function') + callback(callbackArgs); } animateInit(); return this; @@ -2795,6 +2797,8 @@ this.setYaw = function(yaw, animated, callback, callbackArgs) { setTimeout(function(){callback(callbackArgs);}, animated); } else { config.yaw = yaw; + if (typeof callback == 'function') + callback(callbackArgs); } animateInit(); return this; @@ -2862,6 +2866,8 @@ this.setHfov = function(hfov, animated, callback, callbackArgs) { setTimeout(function(){callback(callbackArgs);}, animated); } else { setHfov(hfov); + if (typeof callback == 'function') + callback(callbackArgs); } animateInit(); return this;