Skip to content
EliteChart

ReplayBarSyncHooks

Documentation


Documentation / @elitechart/core / ReplayBarSyncHooks

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

Subscription surface — the consumer wires these to the chart's event bus so the bar stays in sync when state changes through other paths (keyboard shortcuts, code, etc.).

Example

code
const sync: ReplayBarSyncHooks = {
  initialActive: chart.isReplaying(),
  initialPlaying: chart.getReplayState().playing,
  initialSpeedMs: chart.getReplayState().speedMs,
};

Properties

initialActive

code
readonly initialActive: boolean;

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

Called with current state at initialization.


initialPlaying

code
readonly initialPlaying: boolean;

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


initialSpeedMs

code
readonly initialSpeedMs: number;

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