aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/collections')
-rw-r--r--src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
index 467191735..09bb3649d 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
@@ -1270,7 +1270,7 @@ export class CollectionFreeFormView extends CollectionSubView<Partial<collection
_drawing: Doc[] = [];
@undoBatch
- createDrawing = (e: React.PointerEvent<Element>, strokeData: [InkData, string, string][], opts: DrawingOptions, gptRes: string) => {
+ createDrawing = (e: React.PointerEvent<Element>, strokeData: [InkData, string, string][], opts: DrawingOptions, gptRes: string, containerDoc?: Doc) => {
strokeData.forEach((stroke: [InkData, string, string]) => {
const bounds = InkField.getBounds(stroke[0]);
const B = this.screenToFreeformContentsXf.transformBounds(bounds.left, bounds.top, bounds.width, bounds.height);
@@ -1291,16 +1291,16 @@ export class CollectionFreeFormView extends CollectionSubView<Partial<collection
this._drawing.push(inkDoc);
this.addDocument(inkDoc);
});
- // const collection = this._marqueeViewRef.current?.collection(undefined, false, this._drawing);
- // if (collection) {
- // const docData = collection[DocData];
- // docData.title = opts.text;
- // docData.drawingInput = opts.text;
- // docData.drawingComplexity = opts.complexity;
- // docData.drawingColored = opts.autoColor;
- // docData.drawingSize = opts.size;
- // docData.drawingData = gptRes;
- // }
+ const collection = this._marqueeViewRef.current?.collection(undefined, true, this._drawing);
+ if (collection) {
+ const docData = collection[DocData];
+ docData.title = opts.text;
+ docData.drawingInput = opts.text;
+ docData.drawingComplexity = opts.complexity;
+ docData.drawingColored = opts.autoColor;
+ docData.drawingSize = opts.size;
+ docData.drawingData = gptRes;
+ }
this._batch?.end();
};