From 7e4d793eaa7e5b6b564355a11fa02a5611645f20 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Fri, 21 Mar 2025 18:58:21 -0400
Subject: trying to improve how data / layout / root and templtae docs are
 accessed.

---
 src/client/views/nodes/formattedText/FormattedTextBox.tsx | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

(limited to 'src/client/views/nodes/formattedText/FormattedTextBox.tsx')

diff --git a/src/client/views/nodes/formattedText/FormattedTextBox.tsx b/src/client/views/nodes/formattedText/FormattedTextBox.tsx
index b84575389..9078648e9 100644
--- a/src/client/views/nodes/formattedText/FormattedTextBox.tsx
+++ b/src/client/views/nodes/formattedText/FormattedTextBox.tsx
@@ -245,9 +245,8 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<FormattedTextB
                 if (target) {
                     anchor.followLinkAudio = true;
                     let stopFunc: () => void = emptyFunction;
-                    const targetData = target[DocData];
-                    targetData.mediaState = mediaState.Recording;
-                    DictationManager.recordAudioAnnotation(targetData, Doc.LayoutFieldKey(target), stop => { stopFunc = stop }); // prettier-ignore
+                    target.$mediaState = mediaState.Recording;
+                    DictationManager.recordAudioAnnotation(target[DocData], Doc.LayoutFieldKey(target), stop => { stopFunc = stop }); // prettier-ignore
 
                     const reactionDisposer = reaction(
                         () => target.mediaState,
@@ -1067,7 +1066,7 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<FormattedTextB
                 };
                 const link = CreateLinkToActiveAudio(textanchorFunc, false).lastElement();
                 if (link) {
-                    link[DocData].isDictation = true;
+                    link.$isDictation = true;
                     const audioanchor = Cast(link.link_anchor_2, Doc, null);
                     const textanchor = Cast(link.link_anchor_1, Doc, null);
                     if (audioanchor) {
@@ -1077,7 +1076,7 @@ export class FormattedTextBox extends ViewBoxAnnotatableComponent<FormattedTextB
                             audioId: audioanchor[Id],
                             textId: textanchor[Id],
                         });
-                        textanchor[DocData].title = 'dictation:' + audiotag.attrs.timeCode;
+                        textanchor.$title = 'dictation:' + audiotag.attrs.timeCode;
                         const tr = this.EditorView.state.tr.insert(this.EditorView.state.doc.content.size, audiotag);
                         const tr2 = tr.setSelection(TextSelection.create(tr.doc, tr.doc.content.size));
                         this.EditorView.dispatch(tr.setSelection(TextSelection.create(tr2.doc, tr2.doc.content.size)));
-- 
cgit v1.2.3-70-g09d2

