Skip to content

Commit 1ecfab0

Browse files
psychedelicioushipsterusername
authored andcommitted
feat(ui): update canvas handling per node changes
1 parent 7798c37 commit 1ecfab0

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

invokeai/frontend/web/src/services/events/onInvocationComplete.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export const buildOnInvocationComplete = (getState: () => RootState, dispatch: A
8787

8888
const getResultImageDTO = (data: S['InvocationCompleteEvent']) => {
8989
const { result } = data;
90-
if (result.type === 'image_output' || result.type === 'canvas_v2_mask_and_crop_output') {
90+
if (result.type === 'image_output') {
9191
return getImageDTOSafe(result.image.image_name);
9292
}
9393
return null;
@@ -123,10 +123,7 @@ export const buildOnInvocationComplete = (getState: () => RootState, dispatch: A
123123
if (data.destination === 'canvas') {
124124
// TODO(psyche): Can/should we let canvas handle this itself?
125125
if (isCanvasOutputNode(data)) {
126-
if (data.result.type === 'canvas_v2_mask_and_crop_output') {
127-
const { offset_x, offset_y } = data.result;
128-
dispatch(stagingAreaImageStaged({ stagingAreaImage: { imageDTO, offsetX: offset_x, offsetY: offset_y } }));
129-
} else if (data.result.type === 'image_output') {
126+
if (data.result.type === 'image_output') {
130127
dispatch(stagingAreaImageStaged({ stagingAreaImage: { imageDTO, offsetX: 0, offsetY: 0 } }));
131128
}
132129
addImageToGallery(data, imageDTO);

0 commit comments

Comments
 (0)