Add dist/run scripts/workflow

This commit is contained in:
space-nuko
2023-05-04 21:49:58 -05:00
parent 5bac1de3cd
commit 156bef6f4d
9 changed files with 1492 additions and 1358 deletions

View File

@@ -11,6 +11,7 @@
import { ImageViewer } from "$lib/ImageViewer";
import type { ComfyAPIStatus } from "$lib/api";
import { SvelteToast, toast } from '@zerodevx/svelte-toast'
import defaultGraph from "$lib/defaultGraph"
import { LGraph } from "@litegraph-ts/core";
import LightboxModal from "./LightboxModal.svelte";
@@ -95,6 +96,13 @@
}
}
async function doLoadDefault(): void {
var confirmed = confirm("Are you sure you want to clear the current workflow and load the default graph?");
if (confirmed) {
await app.deserialize(defaultGraph)
}
}
function doRecenter(): void {
app.lCanvas.recenter();
}
@@ -180,6 +188,9 @@
<Button variant="secondary" on:click={doReset}>
Reset
</Button>
<Button variant="secondary" on:click={doLoadDefault}>
Load Default
</Button>
<Button variant="secondary" on:click={doRecenter}>
Recenter
</Button>