We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1012b8c commit 5499b07Copy full SHA for 5499b07
src/components/row_rnd/hooks/useAutoScroll.ts
@@ -49,7 +49,7 @@ export function useAutoScroll(target: React.MutableRefObject<HTMLDivElement>) {
49
const over = Math.abs(e.clientX >= rightBoundRef.current ? e.clientX - rightBoundRef.current : e.clientX - leftBoundRef.current);
50
speed.current = Math.min(Number((over / CRITICAL_SIZE).toFixed(0)) * DEFAULT_SPEED, MAX_SPEED);
51
52
- const direction = dir === 'right' ? 1 : -1;
+ const direction = e.clientX >= rightBoundRef.current ? 1 : -1;
53
const delta = direction * speed.current;
54
const loop = () => {
55
deltaScroll && deltaScroll(delta);
0 commit comments