aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/views/collections/CollectionStackedTimeline.tsx14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/client/views/collections/CollectionStackedTimeline.tsx b/src/client/views/collections/CollectionStackedTimeline.tsx
index 8b937c278..929bfa055 100644
--- a/src/client/views/collections/CollectionStackedTimeline.tsx
+++ b/src/client/views/collections/CollectionStackedTimeline.tsx
@@ -583,9 +583,7 @@ export class CollectionStackedTimeline extends CollectionSubView<
d.anchor,
start + (10 / timelineContentWidth) * this.clipDuration
);
- const left = this.props.trimming ?
- ((start - this.props.clipStart) / this.clipDuration) * timelineContentWidth
- : Math.max((start - this.trimStart) / this.props.trimDuration() * timelineContentWidth, 0);
+ const left = Math.max((start - this.props.clipStart) / this.clipDuration * timelineContentWidth, 0);
const top = (d.level / maxLevel) * this.timelineContentHeight() + 15;
const timespan = end - start;
const width = (timespan / this.clipDuration) * timelineContentWidth;
@@ -632,9 +630,7 @@ export class CollectionStackedTimeline extends CollectionSubView<
<div
className="collectionStackedTimeline-current"
style={{
- left: this.props.trimming
- ? `${((this.currentTime - this.props.clipStart) / this.clipDuration) * 100}%`
- : `${(this.currentTime - this.trimStart) / (this.trimEnd - this.trimStart) * 100}%`,
+ left: `${((this.currentTime - this.props.clipStart) / this.clipDuration) * 100}%`,
}}
/>
@@ -649,8 +645,7 @@ export class CollectionStackedTimeline extends CollectionSubView<
className="collectionStackedTimeline-trim-controls"
style={{
left: `${((this.trimStart - this.props.clipStart) / this.clipDuration) * 100}%`,
- width: `${((this.trimEnd - this.trimStart) / this.clipDuration) * 100
- }%`,
+ width: `${((this.trimEnd - this.trimStart) / this.clipDuration) * 100}%`,
}}
>
<div
@@ -667,8 +662,7 @@ export class CollectionStackedTimeline extends CollectionSubView<
className="collectionStackedTimeline-trim-shade"
style={{
left: `${((this.trimEnd - this.props.clipStart) / this.clipDuration) * 100}%`,
- width: `${((this.clipDuration - this.trimEnd) / this.clipDuration) * 100
- }%`,
+ width: `${((this.props.clipEnd - this.trimEnd) / this.clipDuration) * 100}%`,
}}
></div>
</>