aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/animationtimeline/TimelineOverview.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/animationtimeline/TimelineOverview.tsx')
-rw-r--r--src/client/views/animationtimeline/TimelineOverview.tsx8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/client/views/animationtimeline/TimelineOverview.tsx b/src/client/views/animationtimeline/TimelineOverview.tsx
index 94bbe7074..a587e1138 100644
--- a/src/client/views/animationtimeline/TimelineOverview.tsx
+++ b/src/client/views/animationtimeline/TimelineOverview.tsx
@@ -142,11 +142,15 @@ export class TimelineOverview extends React.Component<TimelineOverviewProps>{
const visibleBarWidth = percentVisible * this.activeOverviewWidth;
const percentScrubberStart = this.currentX / this.props.time;
- const scrubberStart = this.props.currentBarX / this.props.totalLength * this.activeOverviewWidth;
+ let scrubberStart = this.props.currentBarX / this.props.totalLength * this.activeOverviewWidth;
+ if (scrubberStart > this.activeOverviewWidth) scrubberStart = this.activeOverviewWidth;
const percentBarStart = this.visibleStart / this.props.time;
const barStart = percentBarStart * this.activeOverviewWidth;
+ let playWidth = (this.props.currentBarX / this.props.totalLength) * this.activeOverviewWidth;
+ if (playWidth > this.activeOverviewWidth) playWidth = this.activeOverviewWidth;
+
const timeline = this.props.isAuthoring ? [
<div key="timeline-overview-container" className="timeline-overview-container overviewBar" id="timelineOverview">
@@ -159,7 +163,7 @@ export class TimelineOverview extends React.Component<TimelineOverviewProps>{
<div key="timeline-play-container" className="timeline-play-bar overviewBar" id="timelinePlay">
<div ref={this._scrubberRef} className="timeline-play-head" style={{ left: `${scrubberStart}px` }} onPointerDown={this.onScrubberDown}></div>
</div>,
- <div className="timeline-play-tail" style={{ width: `${(this.props.currentBarX / this.props.totalLength) * this.playbarWidth}px` }}></div>
+ <div className="timeline-play-tail" style={{ width: `${playWidth}px` }}></div>
];
return (
<div className="timeline-flex">