mirror of
https://codeberg.org/demostf/frontend.git
synced 2026-06-03 18:24:12 +02:00
fix timeline not updating from outside seeks
This commit is contained in:
parent
116b52c892
commit
8a651088ff
1 changed files with 53 additions and 50 deletions
|
|
@ -7,12 +7,15 @@ export interface TimelineProps {
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const Timeline = ({parser, tick, onSetTick, disabled}) => {
|
export const Timeline = (props: TimelineProps) => {
|
||||||
|
const parser = props.parser;
|
||||||
const background = <TimeLineBackground parser={parser}/>;
|
const background = <TimeLineBackground parser={parser}/>;
|
||||||
return <div class="timeline">
|
return <div class="timeline">
|
||||||
<input max={parser.demo.tickCount} value={tick} class="timeline-progress" type="range" min={0}
|
<input max={parser.demo.tickCount} value={props.tick} class="timeline-progress" type="range" min={0}
|
||||||
onChange={(event) => {onSetTick(parseInt(event.target.value, 10))}}
|
onChange={(event) => {
|
||||||
disabled={disabled}
|
props.onSetTick(parseInt(event.target.value, 10))
|
||||||
|
}}
|
||||||
|
disabled={props.disabled}
|
||||||
/>
|
/>
|
||||||
{background}
|
{background}
|
||||||
</div>;
|
</div>;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue