aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2021-09-30 17:07:36 -0400
committerbobzel <zzzman@gmail.com>2021-09-30 17:07:36 -0400
commita75298a12c636d688ad1be26f6fe89016dc3ce08 (patch)
tree2de54f1cb606eddc0856b69185a127e8fc2687ef
parentef3401509adad83c30b6e724e7376b45f84c2b20 (diff)
fixed clipping audio spans to clipstart/clipend,
-rw-r--r--src/client/views/collections/CollectionStackedTimeline.tsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/collections/CollectionStackedTimeline.tsx b/src/client/views/collections/CollectionStackedTimeline.tsx
index c83174d87..5bc9b17c7 100644
--- a/src/client/views/collections/CollectionStackedTimeline.tsx
+++ b/src/client/views/collections/CollectionStackedTimeline.tsx
@@ -568,7 +568,7 @@ export class CollectionStackedTimeline extends CollectionSubView<
if (end < this.clipStart || start > this.clipEnd) return (null);
const left = Math.max((start - this.clipStart) / this.clipDuration * timelineContentWidth, 0);
const top = (d.level / maxLevel) * this.timelineContentHeight();
- const timespan = end - start;
+ const timespan = Math.max(0, end - this.clipStart) - Math.max(0, start - this.clipStart);
const width = (timespan / this.clipDuration) * timelineContentWidth;
const height = this.timelineContentHeight() / maxLevel;
return this.props.Document.hideAnchors ? null : (