Skip to content

TimelineProps beta ​

Interface of @v12-engine/client/kit

ts
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 ​

ts
children?: JSX.Element;

What lies over the rows, beside them: an empty state, what floats

contentProps ​

ts
contentProps?: Pick<JSX.HTMLAttributes<HTMLDivElement>, 'onPointerOver' | 'onPointerLeave'>;

Props of what holds the rows, where the pointer goes (a host's own hover)

drag ​

ts
drag?: TimelineDragMachine;

The drag, a host's over an adapter of its own (createTimelineDrag)

fps ​

ts
fps?: number;

Frames a second of the ruler's ticks

gutter ​

ts
gutter?: number;

Pixels before the start of time, so a key at 0 is drawn whole (ruled)

height ​

ts
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 ​

ts
inOut?: TimelineInOut;

The stretch between the in and out points, drawn on the ruler

inOutTip ​

ts
inOutTip?: () => string;

The words of the in and out stretch's tooltip

lane ​

ts
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 ​

ts
lanes: readonly L[];

The lanes, top to bottom; TimelineLanes are drawn by the timeline itself

markers ​

ts
markers?: readonly TimelineMarker[];

The marks on the ruler

markerTip ​

ts
markerTip?: (marker: TimelineMarker) => string;

The words of a marker's tooltip

onEdit ​

ts
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 ​

ts
onMarkerOpen?: (index: number) => void;

A marker double-clicked

onPress ​

ts
onPress?: (event: PointerEvent) => boolean | void;

The pointer going down, before it grabs anything: false leaves it alone

onScroller ​

ts
onScroller?: (box: HTMLDivElement | undefined) => void;

Its scrolling box as it is made, and none as it goes (ruled)

onView ​

ts
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 ​

ts
onZoom?: (pps: number, around: number) => void;

What the wheel zooms to, about a time (ruled)

playhead ​

ts
playhead?: number;

The time of the playhead, in seconds; none is drawn when left out

pps ​

ts
pps?: number;

Pixels a second: a ruled timeline, scrolled. With none it fits span to its width

readOnly ​

ts
readOnly?: boolean;

Nothing is dragged in it

rowHeight ​

ts
rowHeight?: number;

How tall a lane's row is, in pixels, where the lane says none of its own

rulerHeight ​

ts
rulerHeight?: number;

How tall the ruler is, in pixels

rulerTip ​

ts
rulerTip?: string;

What the ruler says of itself, and how its tooltip is placed

selection ​

ts
selection?: TimelineSelection;

The items drawn as selected

span ​

ts
span: number;

The seconds it shows

view ​

ts
view?: {
        left: number;
        top: number;
        width: number;
        height: number;
    };

What is in view: where it is scrolled, how big it is (ruled)