From 7f40d23f1948ed803a1faa3a0d4cc09d845ee9e2 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Wed, 3 Jul 2024 18:50:46 +1000 Subject: [PATCH] fix(ui): staging area image offset --- .../listeners/addCommitStagingAreaImageListener.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/addCommitStagingAreaImageListener.ts b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/addCommitStagingAreaImageListener.ts index 4aa6020d0a..1da9b90b9e 100644 --- a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/addCommitStagingAreaImageListener.ts +++ b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/addCommitStagingAreaImageListener.ts @@ -65,10 +65,9 @@ export const addStagingListeners = (startAppListening: AppStartListening) => { assert(layer, 'No layer found to stage image'); - const { x, y } = bbox; const { id } = layer; - api.dispatch(layerImageAdded({ id, imageDTO, pos: { x, y } })); + api.dispatch(layerImageAdded({ id, imageDTO, pos: { x: bbox.x - layer.x, y: bbox.y - layer.y } })); }, }); };