aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2021-03-20 17:03:44 -0400
committerbobzel <zzzman@gmail.com>2021-03-20 17:03:44 -0400
commitf4306392332a7895a82ea62267242ceafa228ae8 (patch)
tree4cc2c446820c60194b82dbc906fc93d5ce4a6348 /src
parentf7e9d374d2b397a395da48af412323f61538b7d9 (diff)
fixed color box
Diffstat (limited to 'src')
-rw-r--r--src/client/views/nodes/ColorBox.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/nodes/ColorBox.tsx b/src/client/views/nodes/ColorBox.tsx
index d2a0b2be5..59a26f323 100644
--- a/src/client/views/nodes/ColorBox.tsx
+++ b/src/client/views/nodes/ColorBox.tsx
@@ -37,12 +37,12 @@ export class ColorBox extends ViewBoxBaseComponent<FieldViewProps, ColorDocument
view.props.Document.isTemplateForField ? view.props.Document : Doc.GetProto(view.props.Document);
if (targetDoc) {
if (view.props.LayoutTemplate?.() || view.props.LayoutTemplateString) { // this situation typically occurs when you have a link dot
- targetDoc.backgroundColor = Doc.UserDoc().backgroundColor; // bcz: don't know how to change the color of an inline template...
+ targetDoc.backgroundColor = color.hex; // bcz: don't know how to change the color of an inline template...
}
else if (RichTextMenu.Instance?.TextViewFieldKey && window.getSelection()?.toString() !== "") {
- Doc.Layout(view.props.Document)[RichTextMenu.Instance.TextViewFieldKey + "-color"] = Doc.UserDoc().backgroundColor;
+ Doc.Layout(view.props.Document)[RichTextMenu.Instance.TextViewFieldKey + "-color"] = color.hex;
} else {
- Doc.Layout(view.props.Document)._backgroundColor = Doc.UserDoc().backgroundColor; // '_backgroundColor' is template specific. 'backgroundColor' would apply to all templates, but has no UI at the moment
+ Doc.Layout(view.props.Document)._backgroundColor = color.hex; // '_backgroundColor' is template specific. 'backgroundColor' would apply to all templates, but has no UI at the moment
}
}
});