aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionStackedTimeline.tsx
diff options
context:
space:
mode:
authormehekj <mehek.jethani@gmail.com>2021-09-11 11:47:22 -0400
committermehekj <mehek.jethani@gmail.com>2021-09-11 11:47:22 -0400
commit7e0a60dc39ce2ad3fc8f90197f5ade7fe5e5b112 (patch)
tree6cbb6ee859317ec7cc3c93a5cc629d290addfafb /src/client/views/collections/CollectionStackedTimeline.tsx
parent610f197693271c8d2a80c980f9abd5e6f68ce3f5 (diff)
fixed record buttons and trimmed marker width appearance
Diffstat (limited to 'src/client/views/collections/CollectionStackedTimeline.tsx')
-rw-r--r--src/client/views/collections/CollectionStackedTimeline.tsx8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/client/views/collections/CollectionStackedTimeline.tsx b/src/client/views/collections/CollectionStackedTimeline.tsx
index 51e05e278..56621d6d5 100644
--- a/src/client/views/collections/CollectionStackedTimeline.tsx
+++ b/src/client/views/collections/CollectionStackedTimeline.tsx
@@ -548,10 +548,14 @@ export class CollectionStackedTimeline extends CollectionSubView<
);
const left = this.props.trimming ?
(start / this.duration) * timelineContentWidth
- : (start - this.trimStart) / this.props.trimDuration * timelineContentWidth;
+ : Math.max((start - this.trimStart) / this.props.trimDuration * timelineContentWidth, 0);
const top = (d.level / maxLevel) * this.timelineContentHeight();
const timespan = end - start;
- const width = (timespan / this.props.trimDuration) * timelineContentWidth;
+ let width = (timespan / this.props.trimDuration) * timelineContentWidth;
+ width = (!this.props.trimming && left == 0) ?
+ width - ((this.trimStart - start) / this.props.trimDuration * timelineContentWidth) : width;
+ width = (!this.props.trimming && this.trimEnd < end) ?
+ width - ((end - this.trimEnd) / this.props.trimDuration * timelineContentWidth) : width;
const height = this.timelineContentHeight() / maxLevel
return this.props.Document.hideAnchors ? null : (
<div