Fixing UI editing mode

This commit is contained in:
space-nuko
2023-04-29 13:08:59 -07:00
parent f62fa69122
commit 42f6f12ceb
5 changed files with 74 additions and 31 deletions

View File

@@ -2,11 +2,13 @@ import { writable } from 'svelte/store';
import type { Readable, Writable } from 'svelte/store';
import type ComfyApp from "$lib/components/ComfyApp"
export type UIEditMode = "disabled" | "widgets" | "containers" | "layout";
export type UIState = {
app: ComfyApp,
nodesLocked: boolean,
graphLocked: boolean,
unlocked: boolean,
uiEditMode: UIEditMode
}
export type WritableUIStateStore = Writable<UIState>;
@@ -14,7 +16,7 @@ const store: WritableUIStateStore = writable(
{
graphLocked: true,
nodesLocked: false,
unlocked: false,
uiEditMode: "disabled",
})
const uiStateStore: WritableUIStateStore =