From c05a23912f61e89ccc02bdca609d0b2f1b86b700 Mon Sep 17 00:00:00 2001 From: hippoz <10706925-hippoz@users.noreply.gitlab.com> Date: Fri, 26 Aug 2022 16:41:57 +0300 Subject: [PATCH] add sensitivity option --- frontend/src/Touchpad.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/Touchpad.js b/frontend/src/Touchpad.js index 0162ba5..d26dfeb 100644 --- a/frontend/src/Touchpad.js +++ b/frontend/src/Touchpad.js @@ -1,6 +1,8 @@ const HOLDING_THRESHOLD_MS = 300; const SCROLL_X_DAMPENING = 0.02; const SCROLL_Y_DAMPENING = 0.09; +const MOVE_X_MULTIPLIER = 1.64; +const MOVE_Y_MULTIPLIER = 1.64; class TouchpadController { constructor(connection) { @@ -119,7 +121,7 @@ class TouchpadController { this._sendSingleClick("right"); } else { if ( - this._sendRelativeMouseMovement(deltaX, deltaY) + this._sendRelativeMouseMovement(deltaX * MOVE_X_MULTIPLIER, deltaY * MOVE_Y_MULTIPLIER) ) { shouldMarkTouchesAsMoved = true; }