Workflow creation/modified state
This commit is contained in:
@@ -69,7 +69,12 @@ export class ComfyWorkflow {
|
||||
/*
|
||||
* Global workflow attributes
|
||||
*/
|
||||
attrs: WorkflowAttributes
|
||||
attrs: WorkflowAttributes;
|
||||
|
||||
/*
|
||||
* True if an unsaved modification has been detected on this workflow
|
||||
*/
|
||||
isModified: boolean = false;
|
||||
|
||||
get layout(): WritableLayoutStateStore | null {
|
||||
return layoutStates.getLayout(this.id)
|
||||
@@ -89,6 +94,11 @@ export class ComfyWorkflow {
|
||||
this.graph = new ComfyGraph(this.id);
|
||||
}
|
||||
|
||||
notifyModified() {
|
||||
this.isModified = true;
|
||||
store.set(get(store));
|
||||
}
|
||||
|
||||
start(key: string, canvas: ComfyGraphCanvas) {
|
||||
if (this.canvases[key] != null)
|
||||
throw new Error(`This workflow is already being displayed on canvas ${key}`)
|
||||
|
||||
Reference in New Issue
Block a user