feat(ui): initialState is for generation mode

This commit is contained in:
psychedelicious 2024-07-08 17:23:14 +10:00
parent bb712b3b3f
commit a181a684f5
2 changed files with 3 additions and 2 deletions

View File

@ -25,7 +25,7 @@ import { RGBA_RED } from './types';
const initialState: CanvasV2State = {
_version: 3,
selectedEntityIdentifier: { type: 'inpaint_mask', id: 'inpaint_mask' },
selectedEntityIdentifier: null,
layers: { entities: [], imageCache: null },
controlAdapters: { entities: [] },
ipAdapters: { entities: [] },
@ -44,7 +44,7 @@ const initialState: CanvasV2State = {
y: 0,
},
tool: {
selected: 'bbox',
selected: 'view',
selectedBuffer: null,
invertScroll: false,
fill: RGBA_RED,

View File

@ -5,6 +5,7 @@ import type { ImageDTO } from 'services/api/types';
export const sessionReducers = {
sessionStarted: (state) => {
state.session.isActive = true;
state.selectedEntityIdentifier = { id: 'inpaint_mask', type: 'inpaint_mask' };
},
sessionStartedStaging: (state) => {
state.session.isStaging = true;