From 93996d3a25733fbf90b24e9d671aa899b2055e47 Mon Sep 17 00:00:00 2001 From: bobzel Date: Sat, 25 Sep 2021 10:44:16 -0400 Subject: fixed play() bug from last. fixed highlight of punch in/punch out region with spacebar --- src/client/views/collections/CollectionStackedTimeline.tsx | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/client/views/collections') diff --git a/src/client/views/collections/CollectionStackedTimeline.tsx b/src/client/views/collections/CollectionStackedTimeline.tsx index b6321043c..f533bee52 100644 --- a/src/client/views/collections/CollectionStackedTimeline.tsx +++ b/src/client/views/collections/CollectionStackedTimeline.tsx @@ -145,12 +145,21 @@ export class CollectionStackedTimeline extends CollectionSubView< })!; } + _disposer: IReactionDisposer | undefined; componentDidMount() { document.addEventListener("keydown", this.keyEvents, true); + this._disposer = reaction(() => this.currentTime, + () => { + if (CollectionStackedTimeline.SelectingRegion === this) { + this._markerEnd = this.currentTime; + } + + }); } @action componentWillUnmount() { + this._disposer?.(); document.removeEventListener("keydown", this.keyEvents, true); if (CollectionStackedTimeline.SelectingRegion === this) { CollectionStackedTimeline.SelectingRegion = undefined; -- cgit v1.2.3-70-g09d2