fix(ui): staging area image offset

This commit is contained in:
psychedelicious 2024-07-03 18:50:46 +10:00
parent 918354cd9d
commit 7f40d23f19

View File

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