From f66eefce84ce6a7c8c1fdf37f682238e65576ff6 Mon Sep 17 00:00:00 2001 From: Naafiyan Ahmed Date: Tue, 3 May 2022 16:32:13 -0400 Subject: working on subgrouping --- src/client/views/InkTranscription.tsx | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src') diff --git a/src/client/views/InkTranscription.tsx b/src/client/views/InkTranscription.tsx index 7e26b51a0..fa753760a 100644 --- a/src/client/views/InkTranscription.tsx +++ b/src/client/views/InkTranscription.tsx @@ -182,8 +182,6 @@ export class InkTranscription extends React.Component { if (!selected) { return; } - console.log("selected[0].context", DocListCast(selected[0].context)); - console.log("selected[0]", DocListCast(selected[0])); // TODO: nda - probably have to cast this to an actual Doc const ctx = await Cast(selected[0].context, Doc); if (!ctx) { @@ -206,8 +204,6 @@ export class InkTranscription extends React.Component { })) const aggregBounds = aggregateBounds(bounds, 0, 0); - const boundsWidth = Math.abs(aggregBounds.x - aggregBounds.r); - const boundsHeight = Math.abs(aggregBounds.y - aggregBounds.b); if (marqViewRef) { marqViewRef._downX = aggregBounds.x; @@ -227,8 +223,6 @@ export class InkTranscription extends React.Component { delete d._timecodeToShow; // bcz: this should be automatic somehow.. along with any other properties that were logically associated with the original collection delete d._timecodeToHide; // bcz: this should be automatic somehow.. along with any other properties that were logically associated with the original collection // calculate pos based on bounds - // d.x = dx - aggregBounds.x - boundsWidth / 2; - // d.y = dy - aggregBounds.y - boundsHeight / 2; if (marqViewRef?.Bounds) { d.x = dx - marqViewRef.Bounds.left - marqViewRef.Bounds.width / 2; d.y = dy - marqViewRef.Bounds.top - marqViewRef.Bounds.height / 2; -- cgit v1.2.3-70-g09d2 From 48b4af3448d87b7a0ce8aa82a903c07c8b78c2b7 Mon Sep 17 00:00:00 2001 From: Naafiyan Ahmed Date: Tue, 3 May 2022 16:53:59 -0400 Subject: removed unecessary async --- src/client/views/InkTranscription.tsx | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'src') diff --git a/src/client/views/InkTranscription.tsx b/src/client/views/InkTranscription.tsx index fa753760a..9b8e822d7 100644 --- a/src/client/views/InkTranscription.tsx +++ b/src/client/views/InkTranscription.tsx @@ -171,8 +171,7 @@ export class InkTranscription extends React.Component { return max - min; } - subgroupsTranscriptions = async (wordInkDocMap: Map) => { - // TODO: nda - will probably want to go through ffView unprocessed docs and then see if any of the inksToGroup docs are in it and only use those + subgroupsTranscriptions = (wordInkDocMap: Map) => { // loop through the words in wordInkDocMap // for each word, get the inkDocs @@ -231,7 +230,6 @@ export class InkTranscription extends React.Component { })); docView.props.removeDocument?.(selected); - // // TODO: nda - this is the code to actually get a new grouped collection const newCollection = marqViewRef?.getCollection(selected, undefined, [], true); if (newCollection) { newCollection.height = newCollection[HeightSym](); @@ -292,16 +290,8 @@ export class InkTranscription extends React.Component { wordInkDocMap.set(word, newEntry); } }); - // do the fun marq stuff - // generate subgroups - - console.log(wordInkDocMap); this.subgroupsTranscriptions(wordInkDocMap); - } - // we can iterate through docs and for each doc index into the map by timestamp - - // final mapping should be word to inkDoc } const text = exports['text/plain']; // console.log(text); -- cgit v1.2.3-70-g09d2