only scroll by 1 segment on desktop

This commit is contained in:
Josh Hawkins 2024-03-06 15:18:29 -06:00
parent 260261c3e5
commit 8d183aa0c3

View File

@ -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;
}
}