aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/FormattedTextBox.tsx
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2020-04-23 20:52:09 -0400
committerBob Zeleznik <zzzman@gmail.com>2020-04-23 20:52:09 -0400
commita37559a417b8a19ee56ac3b2f5dd46ef70ca53a6 (patch)
tree4a022fce15d64724214dc327cc67b8c361cd663f /src/client/views/nodes/FormattedTextBox.tsx
parent8a8f2c8848fe76e26188666790accaf236267e78 (diff)
fixed loading of notes with template types. changed noteTypes to ["template-notes"]. Added pass through free form layout engine.
Diffstat (limited to 'src/client/views/nodes/FormattedTextBox.tsx')
-rw-r--r--src/client/views/nodes/FormattedTextBox.tsx7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/client/views/nodes/FormattedTextBox.tsx b/src/client/views/nodes/FormattedTextBox.tsx
index fd7462a10..6ed2a1b9e 100644
--- a/src/client/views/nodes/FormattedTextBox.tsx
+++ b/src/client/views/nodes/FormattedTextBox.tsx
@@ -405,7 +405,7 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<(FieldViewProp
!this.props.Document.rootDocument && funcs.push({
description: "Make Template", event: () => {
this.props.Document.isTemplateDoc = makeTemplate(this.props.Document, true);
- Doc.AddDocToList(Cast(Doc.UserDoc().noteTypes, Doc, null), "data", this.props.Document);
+ Doc.AddDocToList(Cast(Doc.UserDoc()["template-notes"], Doc, null), "data", this.props.Document);
}, icon: "eye"
});
funcs.push({ description: "Toggle Single Line", event: () => this.props.Document._singleLine = !this.props.Document._singleLine, icon: "expand-arrows-alt" });
@@ -433,9 +433,8 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<(FieldViewProp
const change = cm.findByDescription("Change Perspective...");
const changeItems: ContextMenuProps[] = change && "subitems" in change ? change.subitems : [];
- const noteTypesDoc = Cast(Doc.UserDoc().noteTypes, Doc, null);
- const noteTypes = DocListCast(noteTypesDoc?.data);
- noteTypes.forEach(note => {
+ const noteTypesDoc = Cast(Doc.UserDoc()["template-notes"], Doc, null);
+ DocListCast(noteTypesDoc?.data).forEach(note => {
changeItems.push({
description: StrCast(note.title), event: () => {
Doc.setNativeView(this.props.Document);