WOrkflow/layout fixes

This commit is contained in:
space-nuko
2023-05-10 21:49:46 -05:00
parent c0bd46b079
commit 48923ec60f
11 changed files with 933 additions and 42 deletions

View File

@@ -8,7 +8,7 @@ import { get } from "svelte/store";
import type ComfyGraphNode from "./nodes/ComfyGraphNode";
import type IComfyInputSlot from "./IComfyInputSlot";
import type { ComfyBackendNode } from "./nodes/ComfyBackendNode";
import type { ComfyWidgetNode } from "./nodes";
import type { ComfyComboNode, ComfyWidgetNode } from "./nodes";
type ComfyGraphEvents = {
configured: (graph: LGraph) => void
@@ -108,6 +108,11 @@ export default class ComfyGraph extends LGraph {
widgetNode.collapse();
widgetNode.pos = [inputPos[0] - 140, inputPos[1] + LiteGraph.NODE_SLOT_HEIGHT / 2];
widgetNodesAdded.push(widgetNode)
// Set combo box as loaded
if (widgetNode.type === "ui/combo" && widgetNode.properties.values != null) {
(widgetNode as ComfyComboNode).formatValues(widgetNode.properties.values);
}
}
}
}