aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormehekj <mehek.jethani@gmail.com>2022-05-03 17:07:27 -0400
committermehekj <mehek.jethani@gmail.com>2022-05-03 17:07:27 -0400
commit1b9b36d87fd06a3d53586e18bea390a25c31c091 (patch)
treed8ca3e49744cc14cd32d9188436303b1e2576a11
parentac0e05eefa24aad2d90f661a33ede9c65c0fa33c (diff)
parent48b4af3448d87b7a0ce8aa82a903c07c8b78c2b7 (diff)
Merge branch 'inking-naafi-mehek' of https://github.com/brown-dash/Dash-Web into inking-naafi-mehek
-rw-r--r--src/client/views/InkTranscription.tsx18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/client/views/InkTranscription.tsx b/src/client/views/InkTranscription.tsx
index 3892f4cbb..ca0f9792d 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<string, Doc[]>) => {
- // 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<string, Doc[]>) => {
// loop through the words in wordInkDocMap
// for each word, get the inkDocs
@@ -182,8 +181,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 +203,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 +222,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;
@@ -237,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]();
@@ -298,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);