From 23d32ffd20ad20bdc753e777a720d149b2fece63 Mon Sep 17 00:00:00 2001 From: Will Calderbank Date: Tue, 27 Nov 2018 10:26:37 +0000 Subject: [PATCH] Prevent friction value of undefined breaking inertia --- src/js/pannellum.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/js/pannellum.js b/src/js/pannellum.js index 077fa57..417d4a8 100644 --- a/src/js/pannellum.js +++ b/src/js/pannellum.js @@ -1249,6 +1249,7 @@ function keyRepeat() { // "Inertia" if (diff > 0 && !config.autoRotate) { // "Friction" + config.friction = config.friction == undefined ? defaultConfig.friction : config.friction; var slowDownFactor = 1 - config.friction; // Yaw