diff --git a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/imageDropped.ts b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/imageDropped.ts index fb4ffbca7c..8368e42ec3 100644 --- a/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/imageDropped.ts +++ b/invokeai/frontend/web/src/app/store/middleware/listenerMiddleware/listeners/imageDropped.ts @@ -101,12 +101,12 @@ export const addImageDroppedListener = (startAppListening: AppStartListening) => * Image dropped on Raster layer */ if ( - overData.actionType === 'ADD_RASTER_LAYER_IMAGE' && + overData.actionType === 'ADD_LAYER_IMAGE' && activeData.payloadType === 'IMAGE_DTO' && activeData.payload.imageDTO ) { - const { layerId } = overData.context; - dispatch(layerImageAdded({ id: layerId, imageDTO: activeData.payload.imageDTO })); + const { id } = overData.context; + dispatch(layerImageAdded({ id, imageDTO: activeData.payload.imageDTO })); return; } diff --git a/invokeai/frontend/web/src/features/dnd/types/index.ts b/invokeai/frontend/web/src/features/dnd/types/index.ts index b041546ec8..19dcbf19c0 100644 --- a/invokeai/frontend/web/src/features/dnd/types/index.ts +++ b/invokeai/frontend/web/src/features/dnd/types/index.ts @@ -51,17 +51,6 @@ export type LayerImageDropData = BaseDropData & { }; }; -export type RasterLayerImageDropData = BaseDropData & { - actionType: 'ADD_RASTER_LAYER_IMAGE'; - context: { - layerId: string; - }; -}; - -export type CanvasInitialImageDropData = BaseDropData & { - actionType: 'SET_CANVAS_INITIAL_IMAGE'; -}; - type UpscaleInitialImageDropData = BaseDropData & { actionType: 'SET_UPSCALE_INITIAL_IMAGE'; }; @@ -104,7 +93,6 @@ export type TypesafeDroppableData = | IPAImageDropData | RGIPAdapterImageDropData | SelectForCompareDropData - | RasterLayerImageDropData | UpscaleInitialImageDropData | LayerImageDropData; diff --git a/invokeai/frontend/web/src/features/dnd/util/isValidDrop.ts b/invokeai/frontend/web/src/features/dnd/util/isValidDrop.ts index 80ea701727..128e5c5d50 100644 --- a/invokeai/frontend/web/src/features/dnd/util/isValidDrop.ts +++ b/invokeai/frontend/web/src/features/dnd/util/isValidDrop.ts @@ -29,8 +29,6 @@ export const isValidDrop = (overData?: TypesafeDroppableData | null, activeData? return payloadType === 'IMAGE_DTO'; case 'SELECT_FOR_COMPARE': return payloadType === 'IMAGE_DTO'; - case 'SET_INITIAL_IMAGE': - return payloadType === 'IMAGE_DTO'; case 'ADD_TO_BOARD': { // If the board is the same, don't allow the drop