diff options
| author | Zachary Zhang <zacharyzhang7@gmail.com> | 2024-07-08 12:52:54 -0400 |
|---|---|---|
| committer | Zachary Zhang <zacharyzhang7@gmail.com> | 2024-07-08 12:52:54 -0400 |
| commit | 5d0dd1de740a8e1fa589ebf7dc7a9f7df0db63b9 (patch) | |
| tree | 1f037eb004139bfe672beaf9d81343c914758b61 /src/client/views/nodes/DiagramBox.tsx | |
| parent | d509f24d29290cfc67d58a7a34c056ac1b163844 (diff) | |
switched to iink-ts not functional
Diffstat (limited to 'src/client/views/nodes/DiagramBox.tsx')
| -rw-r--r-- | src/client/views/nodes/DiagramBox.tsx | 32 |
1 files changed, 16 insertions, 16 deletions
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); |
