Skip to content
EliteChart

ReplayBar

Documentation


Documentation / @elitechart/core / ReplayBar

Defined in: ui/replay-bar.ts:90

Bar-replay control strip — Enter/Exit, step back/forward, play/pause, speed select. Subscribes the chart's replay:* events back into the UI to keep the buttons in sync with code-level changes.

Example

code
const bar = new ReplayBar({ mount: container, binding, sync });
chart.on('replay:enter', () => bar.onReplayEnter());
chart.on('replay:exit', () => bar.onReplayExit());
chart.on('replay:play', ({ speedMs }) => bar.onReplayPlay(speedMs));
chart.on('replay:pause', () => bar.onReplayPause());

Constructors

Constructor

code
new ReplayBar(config): ReplayBar;

Defined in: ui/replay-bar.ts:105

Parameters

config

ReplayBarConfig

Returns

ReplayBar

Accessors

element

Get Signature

code
get element(): HTMLElement;

Defined in: ui/replay-bar.ts:166

Testing hook — access the root element.

Returns

HTMLElement

Methods

destroy()

code
destroy(): void;

Defined in: ui/replay-bar.ts:170

Returns

void


onReplayEnter()

code
onReplayEnter(): void;

Defined in: ui/replay-bar.ts:140

Call whenever replay enters (e.g. from chart.on('replay:enter', …)).

Returns

void


onReplayExit()

code
onReplayExit(): void;

Defined in: ui/replay-bar.ts:146

Returns

void


onReplayPause()

code
onReplayPause(): void;

Defined in: ui/replay-bar.ts:160

Returns

void


onReplayPlay()

code
onReplayPlay(speedMs): void;

Defined in: ui/replay-bar.ts:154

Parameters

speedMs

number

Returns

void