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 } })); }, }); };