TimelineProps beta
Interface of @v12-engine/client/kit
export interface TimelineProps<L = TimelineLane> extends Omit<JSX.HTMLAttributes<HTMLDivElement>, 'children' | 'onPointerDown'>What a Timeline is given. Anything else goes on its element
Members
children
children?: JSX.Element;What lies over the rows, beside them: an empty state, what floats
contentProps
contentProps?: Pick<JSX.HTMLAttributes<HTMLDivElement>, 'onPointerOver' | 'onPointerLeave'>;Props of what holds the rows, where the pointer goes (a host's own hover)
drag
drag?: TimelineDragMachine;The drag, a host's over an adapter of its own (createTimelineDrag)
fps
fps?: number;Frames a second of the ruler's ticks
gutter
gutter?: number;Pixels before the start of time, so a key at 0 is drawn whole (ruled)
height
height?: number;What a lane's drawn items are not told: how many pixels of rows there are, where the host lays them out itself
inOut
inOut?: TimelineInOut;The stretch between the in and out points, drawn on the ruler
inOutTip
inOutTip?: () => string;The words of the in and out stretch's tooltip
lane
lane?: (lane: L, index: Accessor<number>) => JSX.Element;A lane's row, drawn by the host (TimelineRow and the items' parts): TimelineLanes are drawn by themselves
lanes
lanes: readonly L[];The lanes, top to bottom; TimelineLanes are drawn by the timeline itself
markers
markers?: readonly TimelineMarker[];The marks on the ruler
markerTip
markerTip?: (marker: TimelineMarker) => string;The words of a marker's tooltip
onEdit
onEdit?: (edit: TimelineEdit) => void;What the host says of what asks for an edit: TimelineLanes are edited through this, by the drag it makes itself
onMarkerOpen
onMarkerOpen?: (index: number) => void;A marker double-clicked
onPress
onPress?: (event: PointerEvent) => boolean | void;The pointer going down, before it grabs anything: false leaves it alone
onScroller
onScroller?: (box: HTMLDivElement | undefined) => void;Its scrolling box as it is made, and none as it goes (ruled)
onView
onView?: (view: {
left: number;
top: number;
width: number;
height: number;
}) => void;Told where the view is scrolled to and how big it is, when either changes
onZoom
onZoom?: (pps: number, around: number) => void;What the wheel zooms to, about a time (ruled)
playhead
playhead?: number;The time of the playhead, in seconds; none is drawn when left out
pps
pps?: number;Pixels a second: a ruled timeline, scrolled. With none it fits span to its width
readOnly
readOnly?: boolean;Nothing is dragged in it
rowHeight
rowHeight?: number;How tall a lane's row is, in pixels, where the lane says none of its own
rulerHeight
rulerHeight?: number;How tall the ruler is, in pixels
rulerTip
rulerTip?: string;What the ruler says of itself, and how its tooltip is placed
selection
selection?: TimelineSelection;The items drawn as selected
span
span: number;The seconds it shows
view
view?: {
left: number;
top: number;
width: number;
height: number;
};What is in view: where it is scrolled, how big it is (ruled)