mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
feat(ui): wip transform mode
This commit is contained in:
@@ -194,6 +194,7 @@ export const {
|
||||
allEntitiesDeleted,
|
||||
clipToBboxChanged,
|
||||
canvasReset,
|
||||
toolIsTransformingChanged,
|
||||
// bbox
|
||||
bboxChanged,
|
||||
bboxScaledSizeChanged,
|
||||
|
||||
@@ -20,4 +20,7 @@ export const toolReducers = {
|
||||
toolBufferChanged: (state, action: PayloadAction<Tool | null>) => {
|
||||
state.tool.selectedBuffer = action.payload;
|
||||
},
|
||||
toolIsTransformingChanged: (state, action: PayloadAction<boolean>) => {
|
||||
state.tool.isTransforming = action.payload;
|
||||
},
|
||||
} satisfies SliceCaseReducers<CanvasV2State>;
|
||||
|
||||
@@ -464,7 +464,7 @@ export const CA_PROCESSOR_DATA: CAProcessorsData = {
|
||||
},
|
||||
};
|
||||
|
||||
const zTool = z.enum(['brush', 'eraser', 'move', 'rect', 'view', 'bbox', 'transform']);
|
||||
const zTool = z.enum(['brush', 'eraser', 'move', 'rect', 'view', 'bbox']);
|
||||
export type Tool = z.infer<typeof zTool>;
|
||||
export function isDrawingTool(tool: Tool): tool is 'brush' | 'eraser' | 'rect' {
|
||||
return tool === 'brush' || tool === 'eraser' || tool === 'rect';
|
||||
@@ -850,6 +850,7 @@ export type CanvasV2State = {
|
||||
brush: { width: number };
|
||||
eraser: { width: number };
|
||||
fill: RgbaColor;
|
||||
isTransforming: boolean;
|
||||
};
|
||||
settings: {
|
||||
imageSmoothing: boolean;
|
||||
|
||||
Reference in New Issue
Block a user