From 383b0487d5268bd860e514feddf09f4f3eb2fe3f Mon Sep 17 00:00:00 2001
From: eleanor-park <eleanor_park@brown.edu>
Date: Thu, 2 Jan 2025 01:13:50 -0500
Subject: made drawing fill automatically size images

---
 src/client/views/nodes/ImageBox.tsx | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

(limited to 'src/client/views/nodes/ImageBox.tsx')

diff --git a/src/client/views/nodes/ImageBox.tsx b/src/client/views/nodes/ImageBox.tsx
index 8f6a90e61..7ce429f0f 100644
--- a/src/client/views/nodes/ImageBox.tsx
+++ b/src/client/views/nodes/ImageBox.tsx
@@ -355,9 +355,8 @@ export class ImageBox extends ViewBoxAnnotatableComponent<FieldViewProps>() {
             this.layoutDoc.ai_generated &&
                 funcs.push({
                     description: 'Regenerate AI Image',
-                    event: action(() => {
-                        console.log('COOOORDS', this.dataDoc.width as number, this.dataDoc.y as number);
-                        !SmartDrawHandler.Instance.ShowRegenerate ? SmartDrawHandler.Instance.displayRegenerate(this.dataDoc.x as number, (this.dataDoc.y as number) - 10) : SmartDrawHandler.Instance.hideRegenerate();
+                    event: action(e => {
+                        !SmartDrawHandler.Instance.ShowRegenerate ? SmartDrawHandler.Instance.displayRegenerate(e?.x || 0, e?.y || 0) : SmartDrawHandler.Instance.hideRegenerate();
                     }),
                     icon: 'pen-to-square',
                 });
-- 
cgit v1.2.3-70-g09d2

