From 07622a2b3bfd28b86085c32dc5b8d5ec23cf55a1 Mon Sep 17 00:00:00 2001 From: Daniel Naber Date: Sat, 24 Jan 2015 23:00:43 +0100 Subject: [PATCH] cap diff so panorama doesn't jump after inertia + wait time --- src/js/pannellum.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/js/pannellum.js b/src/js/pannellum.js index 179b3f5..f4e8a8a 100644 --- a/src/js/pannellum.js +++ b/src/js/pannellum.js @@ -608,6 +608,7 @@ function keyRepeat() { newTime = Date.now(); } var diff = (newTime - prevTime) * config.hfov / 1700; + diff = Math.min(diff, 1.0); // If minus key is down if (keysDown[0]) {