diff options
| author | andrewdkim <adkim414@gmail.com> | 2019-11-23 16:30:45 -0500 |
|---|---|---|
| committer | andrewdkim <adkim414@gmail.com> | 2019-11-23 16:30:45 -0500 |
| commit | b5b45c7d8eb9e3056c71d9ca213cca7f2d9c792a (patch) | |
| tree | e6a04ae7ea36d085607a90109e2698db8ac2e034 /src/client/views/nodes/VideoBox.tsx | |
| parent | 8af45ed7f376981ce8f8b1c6d1b2fd3b1546a00e (diff) | |
| parent | 3b37cc31bb09b11238868c34a38a8e99f508479f (diff) | |
merge from master
Diffstat (limited to 'src/client/views/nodes/VideoBox.tsx')
| -rw-r--r-- | src/client/views/nodes/VideoBox.tsx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/client/views/nodes/VideoBox.tsx b/src/client/views/nodes/VideoBox.tsx index 1e48000b6..c43c9d6c4 100644 --- a/src/client/views/nodes/VideoBox.tsx +++ b/src/client/views/nodes/VideoBox.tsx @@ -251,7 +251,7 @@ export class VideoBox extends DocAnnotatableComponent<FieldViewProps, VideoDocum this._youtubeReactionDisposer && this._youtubeReactionDisposer(); this._reactionDisposer = reaction(() => this.Document.currentTimecode, () => !this._playing && this.Seek(this.Document.currentTimecode || 0)); this._youtubeReactionDisposer = reaction(() => [this.props.isSelected(), DocumentDecorations.Instance.Interacting, InkingControl.Instance.selectedTool], () => { - let interactive = InkingControl.Instance.selectedTool === InkTool.None && this.props.isSelected() && !DocumentDecorations.Instance.Interacting; + let interactive = InkingControl.Instance.selectedTool === InkTool.None && this.props.isSelected(true) && !DocumentDecorations.Instance.Interacting; iframe.style.pointerEvents = interactive ? "all" : "none"; }, { fireImmediately: true }); }; @@ -335,8 +335,10 @@ export class VideoBox extends DocAnnotatableComponent<FieldViewProps, VideoDocum return this.addDocument(doc); } + contentFunc = () => [this.youtubeVideoId ? this.youtubeContent : this.content]; render() { - return (<div className={"videoBox-container"} onContextMenu={this.specificContextMenu}> + return (<div className={"videoBox-container"} onContextMenu={this.specificContextMenu} + style={{ transform: `scale(${this.props.ContentScaling()})`, width: `${100 / this.props.ContentScaling()}%`, height: `${100 / this.props.ContentScaling()}%` }} > <CollectionFreeFormView {...this.props} PanelHeight={this.props.PanelHeight} PanelWidth={this.props.PanelWidth} @@ -345,7 +347,7 @@ export class VideoBox extends DocAnnotatableComponent<FieldViewProps, VideoDocum isSelected={this.props.isSelected} isAnnotationOverlay={true} select={emptyFunction} - active={this.active} + active={this.annotationsActive} ContentScaling={returnOne} whenActiveChanged={this.whenActiveChanged} removeDocument={this.removeDocument} @@ -357,7 +359,7 @@ export class VideoBox extends DocAnnotatableComponent<FieldViewProps, VideoDocum renderDepth={this.props.renderDepth + 1} ContainingCollectionDoc={this.props.ContainingCollectionDoc} chromeCollapsed={true}> - {() => [this.youtubeVideoId ? this.youtubeContent : this.content]} + {this.contentFunc} </CollectionFreeFormView> {this.uIButtons} </div >); |
