From 6e66ab2ab9b5b6f988230aac83ac712b43ccfe3a Mon Sep 17 00:00:00 2001
From: Nathan-SR <144961007+Nathan-SR@users.noreply.github.com>
Date: Sun, 11 May 2025 01:30:31 -0400
Subject: working on firefly integration

---
 src/client/views/smartdraw/DrawingFillHandler.tsx | 24 +++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

(limited to 'src/client/views/smartdraw/DrawingFillHandler.tsx')

diff --git a/src/client/views/smartdraw/DrawingFillHandler.tsx b/src/client/views/smartdraw/DrawingFillHandler.tsx
index 3d21029ab..ad5ef7118 100644
--- a/src/client/views/smartdraw/DrawingFillHandler.tsx
+++ b/src/client/views/smartdraw/DrawingFillHandler.tsx
@@ -51,18 +51,18 @@ export class DrawingFillHandler {
                                 const genratedDocs = DocCast(drawing.ai_firefly_generatedDocs) ?? Docs.Create.MasonryDocument([], { _width: 400, _height: 400 });
                                 drawing[DocData].ai_firefly_generatedDocs = genratedDocs;
                                 (res as Upload.ImageInformation[]).map(info => {
-                                    const doc = Docs.Create.ImageDocument(info.accessPaths.agnostic.client, {
-                                        ai: 'firefly',
-                                        tags: new List<string>(['@ai']),
-                                        title: newPrompt,
-                                        _data_usePath: 'alternate:hover',
-                                        data_alternates: new List<Doc>([drawing]),
-                                        ai_firefly_prompt: newPrompt,
-                                        _width: 500,
-                                        data_nativeWidth: info.nativeWidth,
-                                        data_nativeHeight: info.nativeHeight,
-                                    })
                                     if (!fromDocCreator) {
+                                        const doc = Docs.Create.ImageDocument(info.accessPaths.agnostic.client, {
+                                            ai: 'firefly',
+                                            tags: new List<string>(['@ai']),
+                                            title: newPrompt,
+                                            _data_usePath: 'alternate:hover',
+                                            data_alternates: new List<Doc>([drawing]),
+                                            ai_firefly_prompt: newPrompt,
+                                            _width: 500,
+                                            data_nativeWidth: info.nativeWidth,
+                                            data_nativeHeight: info.nativeHeight,
+                                        })
                                         Doc.AddDocToList(
                                             genratedDocs,
                                             undefined,
@@ -72,7 +72,7 @@ export class DrawingFillHandler {
                                             true
                                         );
                                     } else {
-                                        fromDocCreator.addVariationDoc(doc);
+                                        fromDocCreator.addVariation(info.accessPaths.agnostic.client);
                                     }
                                 });
                                 if (!DocumentView.getFirstDocumentView(genratedDocs) && !fromDocCreator) {
-- 
cgit v1.2.3-70-g09d2

