From c5b7906d4d26d454a104209bc94ae25661790183 Mon Sep 17 00:00:00 2001 From: Bui Date: Wed, 16 Feb 2022 13:28:22 +0000 Subject: [PATCH] slow down + improve wheel scroll --- public/src/js/songselect.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/src/js/songselect.js b/public/src/js/songselect.js index 2a4a067..e65eceb 100644 --- a/public/src/js/songselect.js +++ b/public/src/js/songselect.js @@ -290,7 +290,7 @@ class SongSelect{ focused: true } this.songSelecting = { - speed: 200, + speed: 400, resize: 0.3, scrollDelay: 0.1 } @@ -914,9 +914,9 @@ class SongSelect{ } } - if(this.wheelScrolls !== 0 && ms >= this.wheelTimer + 20) { + if(this.wheelScrolls !== 0 && !this.state.locked && ms >= this.wheelTimer + 20) { this.moveToSong(this.wheelScrolls) - this.wheelScrolls = 0 + this.wheelScrolls -= this.wheelScrolls } if(!this.redrawRunning){ @@ -2766,7 +2766,7 @@ class SongSelect{ } }) pageEvents.remove(loader.screen, ["mousemove", "mouseleave", "mousedown", "touchstart"]) - pageEvents.remove(this.canvas, "touchend") + pageEvents.remove(this.canvas, ["touchend", "wheel"]) pageEvents.remove(p2, "message") if(this.touchEnabled && fullScreenSupported){ pageEvents.remove(this.touchFullBtn, "click")