diff options
| author | bobzel <zzzman@gmail.com> | 2021-03-12 17:49:35 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2021-03-12 17:49:35 -0500 |
| commit | 2a17392bd461bfdc669961c5bf8892b7cb6958d6 (patch) | |
| tree | 441ca5ae1bdf5f52fe4b06e0a98d19eb5b512149 /src/client/views/nodes/WebBox.tsx | |
| parent | 75194d8218e1747d177ec018e3cf025b8d8906bc (diff) | |
trying to make treeViews more efficient by making fewer calls to Get document fields getter.
Diffstat (limited to 'src/client/views/nodes/WebBox.tsx')
| -rw-r--r-- | src/client/views/nodes/WebBox.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/nodes/WebBox.tsx b/src/client/views/nodes/WebBox.tsx index 156fe64c9..b15865c1f 100644 --- a/src/client/views/nodes/WebBox.tsx +++ b/src/client/views/nodes/WebBox.tsx @@ -31,6 +31,7 @@ import { LinkDocPreview } from "./LinkDocPreview"; import "./WebBox.scss"; import { DocumentType } from '../../documents/DocumentTypes'; import React = require("react"); +import { CurrentUserUtils } from "../../util/CurrentUserUtils"; const htmlToText = require("html-to-text"); type WebDocument = makeInterface<[typeof documentSchema]>; @@ -487,7 +488,7 @@ export class WebBox extends ViewBoxAnnotatableComponent<FieldViewProps, WebDocum const frozen = !this.props.isSelected() || DocumentDecorations.Instance?.Interacting; const scale = this.props.scaling?.() || 1; return (<> - <div className={"webBox-cont" + (this.props.isSelected() && Doc.GetSelectedTool() === InkTool.None && !DocumentDecorations.Instance?.Interacting ? "-interactive" : "")} + <div className={"webBox-cont" + (this.props.isSelected() && CurrentUserUtils.SelectedTool === InkTool.None && !DocumentDecorations.Instance?.Interacting ? "-interactive" : "")} style={{ width: NumCast(this.layoutDoc[this.fieldKey + "-contentWidth"]) || `${100 / scale}%`, height: `${100 / scale}%`, |
