Skip to content

TimelineHandle

Defined in: src/components/editor/Timeline/Timeline.types.ts:127

Imperative handle exposed via ref on <Timeline>. Stable for the lifetime of the component.

Methods

focus()

focus(): void

Defined in: src/components/editor/Timeline/Timeline.types.ts:129

Focus the timeline body so keyboard navigation starts working.

Returns

void


frameToX()

frameToX(frame): number

Defined in: src/components/editor/Timeline/Timeline.types.ts:151

Map a frame to a track-area CSS-pixel X.

Parameters

frame

number

Returns

number


getElement()

getElement(): HTMLDivElement | null

Defined in: src/components/editor/Timeline/Timeline.types.ts:131

Access the underlying body DOM element.

Returns

HTMLDivElement | null


getFrame()

getFrame(): number

Defined in: src/components/editor/Timeline/Timeline.types.ts:141

Current playhead frame.

Returns

number


getView()

getView(): TimelineView

Defined in: src/components/editor/Timeline/Timeline.types.ts:147

Current visible frame window.

Returns

TimelineView


pause()

pause(): void

Defined in: src/components/editor/Timeline/Timeline.types.ts:137

Pause playback.

Returns

void


play()

play(): void

Defined in: src/components/editor/Timeline/Timeline.types.ts:135

Start playback.

Returns

void


seek()

seek(frame): void

Defined in: src/components/editor/Timeline/Timeline.types.ts:133

Move the playhead to a frame (snapped + clamped).

Parameters

frame

number

Returns

void


setView()

setView(view): void

Defined in: src/components/editor/Timeline/Timeline.types.ts:149

Set the visible frame window (clamped to bounds + minFramesVisible).

Parameters

view

TimelineView

Returns

void


toggle()

toggle(): void

Defined in: src/components/editor/Timeline/Timeline.types.ts:139

Toggle playback.

Returns

void


xToFrame()

xToFrame(x): number

Defined in: src/components/editor/Timeline/Timeline.types.ts:153

Inverse of frameToX.

Parameters

x

number

Returns

number


zoomToFit()

zoomToFit(paddingFrames?): void

Defined in: src/components/editor/Timeline/Timeline.types.ts:143

Fit the view to the whole frame range, with optional padding (frames).

Parameters

paddingFrames?

number

Returns

void


zoomToSelection()

zoomToSelection(): void

Defined in: src/components/editor/Timeline/Timeline.types.ts:145

Fit the view to the current selection. No-op when nothing is selected.

Returns

void