From aeb0521e8ad8f1efc8c3a39af9eb5443c5368453 Mon Sep 17 00:00:00 2001 From: Tyler Schicke Date: Thu, 11 Jul 2019 16:47:22 -0400 Subject: Removed rendering of collapsed tabs --- .../views/collections/CollectionDockingView.tsx | 26 +++++++++++++++++++++- src/client/views/nodes/VideoBox.tsx | 11 +++------ 2 files changed, 28 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionDockingView.tsx b/src/client/views/collections/CollectionDockingView.tsx index 57964442d..abc9bbeba 100644 --- a/src/client/views/collections/CollectionDockingView.tsx +++ b/src/client/views/collections/CollectionDockingView.tsx @@ -26,7 +26,7 @@ import React = require("react"); import { MainView } from '../MainView'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { library } from '@fortawesome/fontawesome-svg-core'; -import { faFile } from '@fortawesome/free-solid-svg-icons'; +import { faFile, faUnlockAlt } from '@fortawesome/free-solid-svg-icons'; import { CurrentUserUtils } from '../../../server/authentication/models/current_user_utils'; library.add(faFile); @@ -471,6 +471,7 @@ export class CollectionDockingView extends React.Component { @observable private _panelHeight = 0; @observable private _document: Opt; @observable private _dataDoc: Opt; + + @observable private _isActive: boolean = false; + get _stack(): any { let parent = (this.props as any).glContainer.parent.parent; if (this._document && this._document.excludeFromLibrary && parent.parent && parent.parent.contentItems.length > 1) { @@ -497,6 +501,25 @@ export class DockedFrameRenderer extends React.Component { })); } + componentDidMount() { + this.props.glContainer.layoutManager.on("activeContentItemChanged", this.onActiveContentItemChanged); + this.props.glContainer.on("tab", this.onActiveContentItemChanged); + this.onActiveContentItemChanged(); + } + + componentWillUnmount() { + this.props.glContainer.layoutManager.off("activeContentItemChanged", this.onActiveContentItemChanged); + this.props.glContainer.off("tab", this.onActiveContentItemChanged); + } + + @action.bound + private onActiveContentItemChanged() { + if (this.props.glContainer.tab) { + this._isActive = this.props.glContainer.tab.isActive; + } + } + + nativeWidth = () => NumCast(this._document!.nativeWidth, this._panelWidth); nativeHeight = () => { let nh = NumCast(this._document!.nativeHeight, this._panelHeight); @@ -571,6 +594,7 @@ export class DockedFrameRenderer extends React.Component { } render() { + if (!this._isActive) return null; let theContent = this.content; return !this._document ? (null) : { this._panelWidth = r.offset.width; this._panelHeight = r.offset.height; })}> diff --git a/src/client/views/nodes/VideoBox.tsx b/src/client/views/nodes/VideoBox.tsx index a5e145856..c65dfe0bd 100644 --- a/src/client/views/nodes/VideoBox.tsx +++ b/src/client/views/nodes/VideoBox.tsx @@ -148,14 +148,9 @@ export class VideoBox extends DocComponent(VideoD let interactive = InkingControl.Instance.selectedTool ? "" : "-interactive"; let style = "videoBox-cont" + (this._fullScreen ? "-fullScreen" : interactive); return !field ?
Loading
: - VideoBox._showControls ? - : -