From 3d75e7e6bf95f3545edc959fb7eb296ec0ec8c61 Mon Sep 17 00:00:00 2001
From: Naafiyan Ahmed <naafiyan@gmail.com>
Date: Mon, 2 May 2022 17:09:23 -0400
Subject: working on getting subgroups to work

---
 src/client/views/InkTranscription.tsx | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

(limited to 'src/client/views/InkTranscription.tsx')

diff --git a/src/client/views/InkTranscription.tsx b/src/client/views/InkTranscription.tsx
index f7260c5b4..3d505878c 100644
--- a/src/client/views/InkTranscription.tsx
+++ b/src/client/views/InkTranscription.tsx
@@ -176,11 +176,12 @@ export class InkTranscription extends React.Component {
 
         // iterate through the keys of wordInkDocMap
         wordInkDocMap.forEach((inkDocs: Doc[], word: string) => {
-            const selected = wordInkDocMap.get(word);
+            const selected = inkDocs.slice();
             if (!selected) {
                 return;
             }
-             // loop through selected an get the bound
+            const marqViewRef = this.ffView._marqueeViewRef.current;
+            //  loop through selected an get the bound
             const bounds: { x: number, y: number, width?: number, height?: number }[] = []
 
             selected.map(action(d => {
@@ -192,7 +193,6 @@ export class InkTranscription extends React.Component {
             }))
 
             const aggregBounds = aggregateBounds(bounds, 0, 0);
-            const marqViewRef = this.ffView._marqueeViewRef.current;
 
             // set the vals for bounds in marqueeView
             if (marqViewRef) {
@@ -225,8 +225,6 @@ export class InkTranscription extends React.Component {
                 newCollection.width = newCollection[WidthSym]();
                 newCollection.title = word;
             }
-
-
             // nda - bug: when deleting a stroke before leaving writing mode, delete the stroke from unprocessed ink docs
             newCollection && this.ffView.props.addDocument?.(newCollection);
         });
-- 
cgit v1.2.3-70-g09d2

