refactor: update timeline to use context menu component
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@ -1,29 +1,20 @@
|
|||||||
import { TimelineTrack, TimelineClip } from "@/stores/timeline-store";
|
import { TimelineTrack, TimelineClip } from "@/stores/timeline-store";
|
||||||
|
|
||||||
export type TrackType = "video" | "audio" | "effects";
|
export type TrackType = "video" | "audio" | "effects";
|
||||||
|
|
||||||
export interface TimelineClipProps {
|
export interface TimelineClipProps {
|
||||||
clip: TimelineClip;
|
clip: TimelineClip;
|
||||||
track: TimelineTrack;
|
track: TimelineTrack;
|
||||||
zoomLevel: number;
|
zoomLevel: number;
|
||||||
isSelected: boolean;
|
isSelected: boolean;
|
||||||
onContextMenu: (e: React.MouseEvent, clipId: string) => void;
|
onClipMouseDown: (e: React.MouseEvent, clip: TimelineClip) => void;
|
||||||
onClipMouseDown: (e: React.MouseEvent, clip: TimelineClip) => void;
|
onClipClick: (e: React.MouseEvent, clip: TimelineClip) => void;
|
||||||
onClipClick: (e: React.MouseEvent, clip: TimelineClip) => void;
|
}
|
||||||
}
|
|
||||||
|
export interface ResizeState {
|
||||||
export interface ResizeState {
|
clipId: string;
|
||||||
clipId: string;
|
side: "left" | "right";
|
||||||
side: "left" | "right";
|
startX: number;
|
||||||
startX: number;
|
initialTrimStart: number;
|
||||||
initialTrimStart: number;
|
initialTrimEnd: number;
|
||||||
initialTrimEnd: number;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
export interface ContextMenuState {
|
|
||||||
type: "track" | "clip";
|
|
||||||
trackId: string;
|
|
||||||
clipId?: string;
|
|
||||||
x: number;
|
|
||||||
y: number;
|
|
||||||
}
|
|
||||||
|
Reference in New Issue
Block a user