From 0371242941dfdd1d689d0097140b203bb0b24dea Mon Sep 17 00:00:00 2001 From: bobzel Date: Sun, 5 Jun 2022 20:16:02 -0400 Subject: fixed presentations to allow pinning a clip of audio. fixed TabDocViews to be added properly to DocumentManager. fixed presentations to allow groupWithUp to work in tree/stacking view modes. f --- src/client/views/collections/TabDocView.tsx | 3 +++ src/client/views/nodes/AudioBox.tsx | 1 - src/client/views/nodes/trails/PresBox.tsx | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/TabDocView.tsx b/src/client/views/collections/TabDocView.tsx index ad01be3a3..dab3d490d 100644 --- a/src/client/views/collections/TabDocView.tsx +++ b/src/client/views/collections/TabDocView.tsx @@ -265,6 +265,9 @@ export class TabDocView extends React.Component { // ({ selected, title }) => title && (title.style.backgroundColor = selected ? "white" : ""), // { fireImmediately: true }); } + componentDidUpdate() { + this._view && DocumentManager.Instance.AddView(this._view); + } componentWillUnmount() { this._tabReaction?.(); diff --git a/src/client/views/nodes/AudioBox.tsx b/src/client/views/nodes/AudioBox.tsx index d97cb6f84..85dfd1e9a 100644 --- a/src/client/views/nodes/AudioBox.tsx +++ b/src/client/views/nodes/AudioBox.tsx @@ -611,7 +611,6 @@ export class AudioBox extends ViewBoxAnnotatableComponent() { } if (!group) this._selectedArray.clear(); this.childDocs[index] && this._selectedArray.set(this.childDocs[index], undefined); //Update selected array - if ([CollectionViewType.Stacking, CollectionViewType.Tree].includes(this.layoutDoc._viewType as any) && !group) this.navigateToElement(this.childDocs[index]); //Handles movement to element only when presTrail is list + this.navigateToElement(this.childDocs[index]); //Handles movement to element only when presTrail is list this.onHideDocument(); //Handles hide after/before } }); @@ -357,7 +357,7 @@ export class PresBox extends ViewBoxBaseComponent() { navigateToElement = async (curDoc: Doc) => { const activeItem: Doc = this.activeItem; const targetDoc: Doc = this.targetDoc; - const srcContext = Cast(targetDoc.context, Doc, null); + const srcContext = Cast(targetDoc.context, Doc, null) ?? Cast(Cast(targetDoc.annotationOn, Doc, null)?.context, Doc, null); const presCollection = Cast(this.layoutDoc.presCollection, Doc, null); const collectionDocView = presCollection ? DocumentManager.Instance.getDocumentView(presCollection) : undefined; const includesDoc: boolean = DocListCast(presCollection?.data).includes(targetDoc); -- cgit v1.2.3-70-g09d2