Prepare for multiple workflows

This commit is contained in:
space-nuko
2023-05-20 17:09:00 -05:00
parent 3b9017dfad
commit a29afab9a7
12 changed files with 375 additions and 154 deletions

View File

@@ -18,11 +18,11 @@
lCanvas.draw(true, true);
}
$: if (app != null && app.lGraph && canvasEl != null) {
$: if (app?.activeGraph != null && canvasEl != null) {
if (!lCanvas) {
lCanvas = new ComfyGraphCanvas(app, canvasEl);
lCanvas = new ComfyGraphCanvas(app, app.activeGraph, canvasEl);
lCanvas.allow_interaction = false;
app.lGraph.eventBus.on("afterExecute", () => lCanvas.draw(true))
app.activeGraph.eventBus.on("afterExecute", () => lCanvas.draw(true))
}
resizeCanvas();
}