From a75298a12c636d688ad1be26f6fe89016dc3ce08 Mon Sep 17 00:00:00 2001 From: bobzel Date: Thu, 30 Sep 2021 17:07:36 -0400 Subject: fixed clipping audio spans to clipstart/clipend, --- src/client/views/collections/CollectionStackedTimeline.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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 : ( -- cgit v1.2.3-70-g09d2