diff options
| author | Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com> | 2020-10-24 12:49:15 +0800 |
|---|---|---|
| committer | Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com> | 2020-10-24 12:49:15 +0800 |
| commit | 97acefbfad903b117de59c841224fe801be03984 (patch) | |
| tree | 754ce6b6e71ced295ebd87ffbd79864713931fd8 /src/client/views/nodes/PresBox.tsx | |
| parent | acf01146d0a0b77bec5add3d94ac5905bd9b5f1b (diff) | |
| parent | b0a272ba3c258599b414ffe85667945bcb385705 (diff) | |
Merge branch 'presentation_v1' of https://github.com/browngraphicslab/Dash-Web into presentation_v1
Diffstat (limited to 'src/client/views/nodes/PresBox.tsx')
| -rw-r--r-- | src/client/views/nodes/PresBox.tsx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/client/views/nodes/PresBox.tsx b/src/client/views/nodes/PresBox.tsx index 82a0b6764..c1e554fe0 100644 --- a/src/client/views/nodes/PresBox.tsx +++ b/src/client/views/nodes/PresBox.tsx @@ -137,7 +137,7 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps, PresBoxSchema> } @action - componentDidMount = () => { + componentDidMount() { this.rootDoc.presBox = this.rootDoc; this.rootDoc._forceRenderEngine = "timeline"; this.rootDoc._replacedChrome = "replaced"; @@ -301,7 +301,12 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps, PresBoxSchema> const docToJump = curDoc; const willZoom = false; const openInTab = () => { - collectionDocView ? collectionDocView.props.addDocTab(activeItem, "replace") : this.props.addDocTab(activeItem, "replace:left"); + const tab = Array.from(CollectionDockingView.Instance.tabMap).find(tab => tab.DashDoc === activeItem); + if (tab) { + tab.header.parent.setActiveContentItem(tab.contentItem); + } else { + collectionDocView ? collectionDocView.props.addDocTab(activeItem, "replace") : this.props.addDocTab(activeItem, "replace:left"); + } }; const tabMap = CollectionDockingView.Instance.tabMap; console.log(tabMap); @@ -342,6 +347,8 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps, PresBoxSchema> bestTarget._scrollY = activeItem.presPinViewScroll; } else if (bestTarget.type === DocumentType.COMPARISON) { bestTarget._clipWidth = activeItem.presPinClipWidth; + } else if (bestTarget.type === DocumentType.VID) { + bestTarget._currentTimecode = activeItem.presPinTimecode; } else { bestTarget._viewTransition = activeItem.presTransition ? `transform ${activeItem.presTransition}ms` : 'all 0.5s'; bestTarget._panX = activeItem.presPinViewX; |
