summaryrefslogtreecommitdiff
path: root/apps/web/src/components/editor/timeline/timeline-wheel-handler.tsx
diff options
context:
space:
mode:
authorMaze Winther <mazewinther@gmail.com>2025-07-17 19:46:23 +0200
committerMaze Winther <mazewinther@gmail.com>2025-07-17 19:46:23 +0200
commit648f0b8529b9f3bafb3bfd9a84a31bc9ac6623ae (patch)
tree00a438ce93f12b3b58f705189142a9385d497e4a /apps/web/src/components/editor/timeline/timeline-wheel-handler.tsx
parent0b919d4df84ea523ac9e069bdad5c3b34b7c603d (diff)
downloadopencut-648f0b8529b9f3bafb3bfd9a84a31bc9ac6623ae.tar.gz
stable timeline
Diffstat (limited to 'apps/web/src/components/editor/timeline/timeline-wheel-handler.tsx')
-rw-r--r--apps/web/src/components/editor/timeline/timeline-wheel-handler.tsx32
1 files changed, 0 insertions, 32 deletions
diff --git a/apps/web/src/components/editor/timeline/timeline-wheel-handler.tsx b/apps/web/src/components/editor/timeline/timeline-wheel-handler.tsx
deleted file mode 100644
index b7dfaf76..00000000
--- a/apps/web/src/components/editor/timeline/timeline-wheel-handler.tsx
+++ /dev/null
@@ -1,32 +0,0 @@
-import { useEffect } from "react";
-
-export interface TimelineWheelHandlerProps {
- timelineRef: React.RefObject<HTMLDivElement>;
- isInTimeline: boolean;
- handleWheel: (e: React.WheelEvent) => void;
-}
-
-export function useTimelineWheelHandler({
- timelineRef,
- isInTimeline,
- handleWheel,
-}: TimelineWheelHandlerProps) {
- useEffect(() => {
- const timelineContainer = timelineRef.current;
- if (!timelineContainer || !isInTimeline) return;
-
- const handleWheelCapture = (e: WheelEvent) => {
- handleWheel(e as any);
- };
-
- timelineContainer.addEventListener("wheel", handleWheelCapture, {
- passive: false,
- });
-
- return () => {
- timelineContainer.removeEventListener("wheel", handleWheelCapture);
- };
- }, [handleWheel, isInTimeline, timelineRef]);
-
- return null;
-}