diff options
author | bobzel <zzzman@gmail.com> | 2021-09-23 22:16:52 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2021-09-23 22:16:52 -0400 |
commit | de658e50f58607e6a0bcb2cdaaca28ca81d83b50 (patch) | |
tree | 0b9e46ce0b158e37a3354c391e0350c96391b99c | |
parent | d788f0fbafbf0270ea801eed14cc0996e1d6d7ab (diff) |
cleanup
-rw-r--r-- | src/client/views/collections/CollectionStackedTimeline.tsx | 14 |
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> </> |