improve scrolling dampening
This commit is contained in:
parent
8192cf901a
commit
c573e750eb
1 changed files with 3 additions and 3 deletions
|
@ -8,8 +8,8 @@
|
|||
<script>
|
||||
const HOLDING_THRESHOLD_MS = 300;
|
||||
const SINGLE_CLICK_BUTTON_UP_MS = 5;
|
||||
const SCROLL_X_THRESHOLD = 50;
|
||||
const SCROLL_Y_THRESHOLD = 5;
|
||||
const SCROLL_X_DAMPENING = 0.05;
|
||||
const SCROLL_Y_DAMPENING = 0.06;
|
||||
|
||||
const loggerOfType = (components, type='log') => (...args) => {
|
||||
let str = '%c';
|
||||
|
@ -179,7 +179,7 @@
|
|||
this.lastMoveY = this.currentMoveY;
|
||||
// if two touches moved at the same time, assume scrolling intent
|
||||
if (touches.length === 2) {
|
||||
this._sendRelativeMouseScroll(deltaX * 0.1, deltaY * 0.5);
|
||||
this._sendRelativeMouseScroll(deltaX * SCROLL_X_DAMPENING, deltaY * SCROLL_Y_DAMPENING);
|
||||
} else {
|
||||
this._sendRelativeMouseMovement(deltaX, deltaY);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue