aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/InkTranscription.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-10-01 12:59:36 -0400
committerbobzel <zzzman@gmail.com>2024-10-01 12:59:36 -0400
commitbb40454262a2d915a334d7a26555d25d649d4317 (patch)
tree609460537171088f3b0794270ff8157f42cca843 /src/client/views/InkTranscription.tsx
parentfd114aefcbff5ad7b62aae914ca3336bc17da9d2 (diff)
fixed ink transcription to appear in the correct place. added transcription of selected ink.
Diffstat (limited to 'src/client/views/InkTranscription.tsx')
-rw-r--r--src/client/views/InkTranscription.tsx18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/client/views/InkTranscription.tsx b/src/client/views/InkTranscription.tsx
index 8698a6962..c6b55d55a 100644
--- a/src/client/views/InkTranscription.tsx
+++ b/src/client/views/InkTranscription.tsx
@@ -386,21 +386,15 @@ export class InkTranscription extends React.Component {
);
docView.props.removeDocument?.(selected);
// Gets a collection based on the selected nodes using a marquee view ref
- const newCollection = MarqueeView.getCollection(selected, undefined, true, { top: 1, left: 1, width: 1, height: 1 });
- if (newCollection) {
- newCollection.width = NumCast(newCollection._width);
- newCollection.height = NumCast(newCollection._height);
- // if the grouping we are creating is an individual word
- if (word) {
- newCollection.title = word;
- }
+ const newCollection = MarqueeView.getCollection(selected, undefined, true, marqViewRef?.Bounds ?? { top: 1, left: 1, width: 1, height: 1 });
+ // if the grouping we are creating is an individual word
+ if (word) {
+ newCollection.title = word;
}
// nda - bug: when deleting a stroke before leaving writing mode, delete the stroke from unprocessed ink docs
- if (newCollection) {
- docView.props.addDocument?.(newCollection);
- newCollection.hasTextBox = false;
- }
+ docView.props.addDocument?.(newCollection);
+ newCollection.hasTextBox = false;
return newCollection;
}