From 8d183aa0c3742760c14c85135c5642573237df1a Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Wed, 6 Mar 2024 15:18:29 -0600 Subject: [PATCH] only scroll by 1 segment on desktop --- web/src/hooks/use-handle-dragging.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/web/src/hooks/use-handle-dragging.ts b/web/src/hooks/use-handle-dragging.ts index 1867c84a6..5d813528e 100644 --- a/web/src/hooks/use-handle-dragging.ts +++ b/web/src/hooks/use-handle-dragging.ts @@ -200,14 +200,12 @@ function useDraggableHandler({ let newPosition = clientYPosition; if (draggingAtTopEdge) { - newPosition = - scrolled - (isMobile ? segmentHeight : segmentHeight * 2); + newPosition = scrolled - segmentHeight; timelineRef.current.scrollTop = newPosition; } if (draggingAtBottomEdge) { - newPosition = - scrolled + (isMobile ? segmentHeight : segmentHeight * 2); + newPosition = scrolled + segmentHeight; timelineRef.current.scrollTop = newPosition; } }