From fca99d6126c31fbb18ed9f1034cee6f940b040e8 Mon Sep 17 00:00:00 2001 From: Maze Winther Date: Tue, 10 Feb 2026 16:28:21 +0100 Subject: refactor --- apps/web/src/hooks/timeline/use-edge-auto-scroll.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'apps/web/src/hooks/timeline/use-edge-auto-scroll.ts') diff --git a/apps/web/src/hooks/timeline/use-edge-auto-scroll.ts b/apps/web/src/hooks/timeline/use-edge-auto-scroll.ts index 095c0599..fc5df4d9 100644 --- a/apps/web/src/hooks/timeline/use-edge-auto-scroll.ts +++ b/apps/web/src/hooks/timeline/use-edge-auto-scroll.ts @@ -60,10 +60,7 @@ export function useEdgeAutoScroll({ mouseXRelative > viewportWidth - edgeThreshold && rulerViewport.scrollLeft < scrollMax ) { - const edgeDistance = Math.max( - 0, - viewportWidth - edgeThreshold - mouseXRelative, - ); + const edgeDistance = Math.max(0, viewportWidth - mouseXRelative); const intensity = 1 - edgeDistance / edgeThreshold; scrollSpeed = maxScrollSpeed * intensity; } -- cgit v1.3.1