Skip to content

Commit

Permalink
🐛 (timeline) show current time point correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiamersmann committed Apr 15, 2024
1 parent fff5caf commit 58e9ac3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -314,18 +314,19 @@ export class TimelineComponent extends React.Component<{

render(): JSX.Element {
const { manager, controller } = this
const { startTimeProgress, endTimeProgress, minTime, maxTime } =
controller
const { startHandleTimeBound, endHandleTimeBound } = manager
const {
startTimeProgress,
endTimeProgress,
minTime,
maxTime,
startTime,
endTime,
} = controller

const formattedMinTime = this.formatTime(minTime)
const formattedMaxTime = this.formatTime(maxTime)
const formattedStartTime = this.formatTime(
timeFromTimebounds(startHandleTimeBound, minTime, maxTime)
)
const formattedEndTime = this.formatTime(
timeFromTimebounds(endHandleTimeBound, minTime, maxTime)
)
const formattedStartTime = this.formatTime(startTime)
const formattedEndTime = this.formatTime(endTime)

return (
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ export class TimelineController {
return this.manager.times
}

private get startTime(): number {
get startTime(): number {
return findClosestTime(
this.timesAsc,
this.manager.startHandleTimeBound
)!
}

private get endTime(): number {
get endTime(): number {
return findClosestTime(this.timesAsc, this.manager.endHandleTimeBound)!
}

Expand Down

0 comments on commit 58e9ac3

Please sign in to comment.