Apply prettier formatting

This commit is contained in:
Michael Weimann 2022-12-12 12:24:14 +01:00
parent 1cac306093
commit 526645c791
No known key found for this signature in database
GPG key ID: 53F535A266BB9584
1576 changed files with 65385 additions and 62478 deletions

View file

@ -37,7 +37,7 @@ interface IState {
}
interface ISeekCSS extends CSSProperties {
'--fillTo': number;
"--fillTo": number;
}
const ARROW_SKIP_SECONDS = 5; // arbitrary
@ -48,7 +48,8 @@ export default class SeekBar extends React.PureComponent<IProps, IState> {
private animationFrameFn = new MarkedExecution(
() => this.doUpdate(),
() => requestAnimationFrame(() => this.animationFrameFn.trigger()));
() => requestAnimationFrame(() => this.animationFrameFn.trigger()),
);
public static defaultProps = {
tabIndex: 0,
@ -68,10 +69,7 @@ export default class SeekBar extends React.PureComponent<IProps, IState> {
private doUpdate() {
this.setState({
percentage: percentageOf(
this.props.playback.timeSeconds,
0,
this.props.playback.durationSeconds),
percentage: percentageOf(this.props.playback.timeSeconds, 0, this.props.playback.durationSeconds),
});
}
@ -101,18 +99,20 @@ export default class SeekBar extends React.PureComponent<IProps, IState> {
public render(): ReactNode {
// We use a range input to avoid having to re-invent accessibility handling on
// a custom set of divs.
return <input
type="range"
className='mx_SeekBar'
tabIndex={this.props.tabIndex}
onChange={this.onChange}
onMouseDown={this.onMouseDown}
min={0}
max={1}
value={this.state.percentage}
step={0.001}
style={{ '--fillTo': this.state.percentage } as ISeekCSS}
disabled={this.props.disabled}
/>;
return (
<input
type="range"
className="mx_SeekBar"
tabIndex={this.props.tabIndex}
onChange={this.onChange}
onMouseDown={this.onMouseDown}
min={0}
max={1}
value={this.state.percentage}
step={0.001}
style={{ "--fillTo": this.state.percentage } as ISeekCSS}
disabled={this.props.disabled}
/>
);
}
}