diff options
author | geireann <60007097+geireann@users.noreply.github.com> | 2020-06-11 13:38:51 +0800 |
---|---|---|
committer | geireann <60007097+geireann@users.noreply.github.com> | 2020-06-11 13:38:51 +0800 |
commit | b14c559285d579a90bd8f7282a85283201f2f65c (patch) | |
tree | f89f5359962b8423307df2953610d20eefc821d8 /src/client/apis/youtube/YoutubeBox.tsx | |
parent | a02bbf035b9b97fcebfa2db8ba1176e116863b9e (diff) | |
parent | 4ec18458fd21bd7d7307a3bab2e787346fc3ed0d (diff) |
Merge branch 'master' into mobile_revision_direct
Diffstat (limited to 'src/client/apis/youtube/YoutubeBox.tsx')
-rw-r--r-- | src/client/apis/youtube/YoutubeBox.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/apis/youtube/YoutubeBox.tsx b/src/client/apis/youtube/YoutubeBox.tsx index ce7f49e64..2a1f55710 100644 --- a/src/client/apis/youtube/YoutubeBox.tsx +++ b/src/client/apis/youtube/YoutubeBox.tsx @@ -6,11 +6,11 @@ import { Utils } from "../../../Utils"; import { DocServer } from "../../DocServer"; import { Docs } from "../../documents/Documents"; import { DocumentDecorations } from "../../views/DocumentDecorations"; -import { InkingControl } from "../../views/InkingControl"; import { FieldView, FieldViewProps } from "../../views/nodes/FieldView"; import "../../views/nodes/WebBox.scss"; import "./YoutubeBox.scss"; import React = require("react"); +import { InkTool } from '../../../fields/InkField'; interface VideoTemplate { thumbnailUrl: string; @@ -156,14 +156,14 @@ export class YoutubeBox extends React.Component<FieldViewProps> { @action processVideoDetails = (videoDetails: any[]) => { this.videoDetails = videoDetails; - this.props.Document.cachedDetails = Docs.Get.FromJson({ data: videoDetails, title: "detailBackUp" }); + this.props.Document.cachedDetails = Doc.Get.FromJson({ data: videoDetails, title: "detailBackUp" }); } /** * The function that stores the search results in the props document. */ backUpSearchResults = (videos: any[]) => { - this.props.Document.cachedSearchResults = Docs.Get.FromJson({ data: videos, title: "videosBackUp" }); + this.props.Document.cachedSearchResults = Doc.Get.FromJson({ data: videos, title: "videosBackUp" }); } /** @@ -350,7 +350,7 @@ export class YoutubeBox extends React.Component<FieldViewProps> { const frozen = !this.props.isSelected() || DocumentDecorations.Instance.Interacting; - const classname = "webBox-cont" + (this.props.isSelected() && !InkingControl.Instance.selectedTool && !DocumentDecorations.Instance.Interacting ? "-interactive" : ""); + const classname = "webBox-cont" + (this.props.isSelected() && Doc.GetSelectedTool() === InkTool.None && !DocumentDecorations.Instance.Interacting ? "-interactive" : ""); return ( <> <div className={classname} > |