fix: small, fast scrolls might be detected as swipes

This commit is contained in:
frederik
2024-11-03 10:37:02 +01:00
parent 3433f4cffe
commit 98f0d04329
+1 -1
View File
@@ -434,7 +434,7 @@ function installKeyAndSwipeEventHandler() {
let diffTime = 0; let diffTime = 0;
function checkDirection() { function checkDirection() {
if (Math.abs(diffX) > Math.abs(diffY) && diffTime < 500) { if (Math.abs(diffX) > Math.abs(diffY) && diffTime < 350) {
if (diffX > 20) getTheDate(+1); if (diffX > 20) getTheDate(+1);
if (diffX < -20) getTheDate(-1); if (diffX < -20) getTheDate(-1);
} }