From 5d0dd1de740a8e1fa589ebf7dc7a9f7df0db63b9 Mon Sep 17 00:00:00 2001
From: Zachary Zhang <zacharyzhang7@gmail.com>
Date: Mon, 8 Jul 2024 12:52:54 -0400
Subject: switched to iink-ts not functional

---
 src/client/views/nodes/DiagramBox.tsx | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

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

diff --git a/src/client/views/nodes/DiagramBox.tsx b/src/client/views/nodes/DiagramBox.tsx
index 6ea574aab..fcc028aab 100644
--- a/src/client/views/nodes/DiagramBox.tsx
+++ b/src/client/views/nodes/DiagramBox.tsx
@@ -71,19 +71,19 @@ export class DiagramBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
             this.renderMermaidAsync(this.Document.drawingMermaidCode);
         }
         // this is so that ever time a new doc, text node or ink node, is created, this.createMermaidCode will run which will create a save
-        reaction(
-            () => DocListCast(this.Document.data),
-            () => this.lockInkStroke(),
-            { fireImmediately: true }
-        );
-        reaction(
-            () =>
-                DocListCast(this.Document.data)
-                    .filter(doc => doc.type === 'rich text')
-                    .map(doc => (doc.text as RichTextField).Text),
-            () => this.convertDrawingToMermaidCode(),
-            { fireImmediately: true }
-        );
+        // reaction(
+        //     () => DocListCast(this.Document.data),
+        //     () => this.lockInkStroke(),
+        //     { fireImmediately: true }
+        // );
+        // reaction(
+        //     () =>
+        //         DocListCast(this.Document.data)
+        //             .filter(doc => doc.type === 'rich text')
+        //             .map(doc => (doc.text as RichTextField).Text),
+        //     () => this.convertDrawingToMermaidCode(),
+        //     { fireImmediately: true }
+        // );
         // const rectangleXValues = computed(() =>
         //     DocListCast(this.Document.data)
         //         .filter(doc => doc.title === 'rectangle')
@@ -94,7 +94,7 @@ export class DiagramBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
         //     () => this.lockInkStroke(),
         //     { fireImmediately: true }
         // );
-         // this.lockInkStroke();
+         this.lockInkStroke();
     }
     
     componentDidUpdate = () => {
@@ -363,8 +363,8 @@ export class DiagramBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
                     DocumentManager.Instance.AddViewRenderedCb(this.Document, (docViewForYourCollection) => {
                         if (docViewForYourCollection && docViewForYourCollection.ComponentView) {
                             if (docViewForYourCollection.ComponentView.addDocument&&docViewForYourCollection.ComponentView.removeDocument) {
-                                // docViewForYourCollection.ComponentView?.removeDocument(inkToDelete)
-                                // docViewForYourCollection.ComponentView?.addDocument(newInkDoc);
+                                 docViewForYourCollection.ComponentView?.removeDocument(inkToDelete)
+                                 docViewForYourCollection.ComponentView?.addDocument(newInkDoc);
                             
 
                             
-- 
cgit v1.2.3-70-g09d2

