From dd0526a0a256fb3f1de9e0a2508566adcd6cd7e9 Mon Sep 17 00:00:00 2001
From: bobzel <zzzman@gmail.com>
Date: Thu, 9 Jan 2025 00:02:10 -0500
Subject: fixed sizing of images created by firefly.  added error message for
 failed firefly request.

---
 src/client/views/smartdraw/DrawingFillHandler.tsx | 4 ++--
 1 file changed, 2 insertions(+), 2 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 fea4acb67..96b21123b 100644
--- a/src/client/views/smartdraw/DrawingFillHandler.tsx
+++ b/src/client/views/smartdraw/DrawingFillHandler.tsx
@@ -38,8 +38,8 @@ export class DrawingFillHandler {
                             { prompt: user_prompt || prompt, width: dims.width, height: dims.height, structureUrl, strength, styles })
                             .then((info: Upload.ImageInformation) =>
                                 DocumentViewInternal.addDocTabFunc(Docs.Create.ImageDocument(info.accessPaths.agnostic.client, 
-                                    { ai: 'firefly', ai_firefly_prompt: user_prompt || prompt, nativeWidth: dims.width, nativeHeight: dims.height }), OpenWhere.addRight)
-                        ); // prettier-ignore
+                                    { ai: 'firefly', ai_firefly_prompt: user_prompt || prompt, _width: 500, data_nativeWidth: info.nativeWidth, data_nativeHeight: info.nativeHeight }), OpenWhere.addRight)
+                        ).catch(e => alert("create image failed: " + e.toString())); // prettier-ignore
                     });
             }
             return false;
-- 
cgit v1.2.3-70-g09d2

