mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): dnd to canvas broke
This commit is contained in:
parent
6e5a968aad
commit
a15ba925db
@ -101,12 +101,12 @@ export const addImageDroppedListener = (startAppListening: AppStartListening) =>
|
|||||||
* Image dropped on Raster layer
|
* Image dropped on Raster layer
|
||||||
*/
|
*/
|
||||||
if (
|
if (
|
||||||
overData.actionType === 'ADD_RASTER_LAYER_IMAGE' &&
|
overData.actionType === 'ADD_LAYER_IMAGE' &&
|
||||||
activeData.payloadType === 'IMAGE_DTO' &&
|
activeData.payloadType === 'IMAGE_DTO' &&
|
||||||
activeData.payload.imageDTO
|
activeData.payload.imageDTO
|
||||||
) {
|
) {
|
||||||
const { layerId } = overData.context;
|
const { id } = overData.context;
|
||||||
dispatch(layerImageAdded({ id: layerId, imageDTO: activeData.payload.imageDTO }));
|
dispatch(layerImageAdded({ id, imageDTO: activeData.payload.imageDTO }));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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 & {
|
type UpscaleInitialImageDropData = BaseDropData & {
|
||||||
actionType: 'SET_UPSCALE_INITIAL_IMAGE';
|
actionType: 'SET_UPSCALE_INITIAL_IMAGE';
|
||||||
};
|
};
|
||||||
@ -104,7 +93,6 @@ export type TypesafeDroppableData =
|
|||||||
| IPAImageDropData
|
| IPAImageDropData
|
||||||
| RGIPAdapterImageDropData
|
| RGIPAdapterImageDropData
|
||||||
| SelectForCompareDropData
|
| SelectForCompareDropData
|
||||||
| RasterLayerImageDropData
|
|
||||||
| UpscaleInitialImageDropData
|
| UpscaleInitialImageDropData
|
||||||
| LayerImageDropData;
|
| LayerImageDropData;
|
||||||
|
|
||||||
|
@ -29,8 +29,6 @@ export const isValidDrop = (overData?: TypesafeDroppableData | null, activeData?
|
|||||||
return payloadType === 'IMAGE_DTO';
|
return payloadType === 'IMAGE_DTO';
|
||||||
case 'SELECT_FOR_COMPARE':
|
case 'SELECT_FOR_COMPARE':
|
||||||
return payloadType === 'IMAGE_DTO';
|
return payloadType === 'IMAGE_DTO';
|
||||||
case 'SET_INITIAL_IMAGE':
|
|
||||||
return payloadType === 'IMAGE_DTO';
|
|
||||||
case 'ADD_TO_BOARD': {
|
case 'ADD_TO_BOARD': {
|
||||||
// If the board is the same, don't allow the drop
|
// If the board is the same, don't allow the drop
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user