aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/ColorBox.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2021-03-12 17:49:35 -0500
committerbobzel <zzzman@gmail.com>2021-03-12 17:49:35 -0500
commit2a17392bd461bfdc669961c5bf8892b7cb6958d6 (patch)
tree441ca5ae1bdf5f52fe4b06e0a98d19eb5b512149 /src/client/views/nodes/ColorBox.tsx
parent75194d8218e1747d177ec018e3cf025b8d8906bc (diff)
trying to make treeViews more efficient by making fewer calls to Get document fields getter.
Diffstat (limited to 'src/client/views/nodes/ColorBox.tsx')
-rw-r--r--src/client/views/nodes/ColorBox.tsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/nodes/ColorBox.tsx b/src/client/views/nodes/ColorBox.tsx
index 715ec92f8..61cc8b3d1 100644
--- a/src/client/views/nodes/ColorBox.tsx
+++ b/src/client/views/nodes/ColorBox.tsx
@@ -16,6 +16,7 @@ import "./ColorBox.scss";
import { FieldView, FieldViewProps } from './FieldView';
import { DocumentType } from "../../documents/DocumentTypes";
import { RichTextMenu } from "./formattedText/RichTextMenu";
+import { CurrentUserUtils } from "../../util/CurrentUserUtils";
type ColorDocument = makeInterface<[typeof documentSchema]>;
const ColorDocument = makeInterface(documentSchema);
@@ -30,7 +31,7 @@ export class ColorBox extends ViewBoxBaseComponent<FieldViewProps, ColorDocument
Doc.UserDoc().backgroundColor = Utils.colorString(color);
SetActiveInkColor(color.hex);
- if (Doc.GetSelectedTool() === InkTool.None) {
+ if (CurrentUserUtils.SelectedTool === InkTool.None) {
const selected = SelectionManager.Views();
selected.map(view => {
const targetDoc = view.props.Document.dragFactory instanceof Doc ? view.props.Document.dragFactory :