diff --git a/litegraph b/litegraph index e7df2b2..a6d94ec 160000 --- a/litegraph +++ b/litegraph @@ -1 +1 @@ -Subproject commit e7df2b2b75bb24fd3682bea80229608438bfc913 +Subproject commit a6d94ecb4dcb771f8c9870c29f7cb53f153f93cf diff --git a/src/lib/components/ComfyApp.ts b/src/lib/components/ComfyApp.ts index 462979d..12ee317 100644 --- a/src/lib/components/ComfyApp.ts +++ b/src/lib/components/ComfyApp.ts @@ -120,6 +120,8 @@ export default class ComfyApp { return; } + this.setupColorScheme() + this.rootEl = document.getElementById("app") as HTMLDivElement; this.canvasEl = document.getElementById("graph-canvas") as HTMLCanvasElement; this.lGraph = new ComfyGraph(); @@ -160,8 +162,6 @@ export default class ComfyApp { this.addPasteHandler(); this.addKeyboardHandler(); - this.setupColorScheme() - // await this.#invokeExtensionsAsync("setup"); // Ensure the canvas fills the window @@ -346,8 +346,8 @@ export default class ComfyApp { private setupColorScheme() { const setColor = (type: any, color: string) => { - this.lCanvas.link_type_colors[type] = color - this.lCanvas.default_connection_color_byType[type] = color + LGraphCanvas.DEFAULT_LINK_TYPE_COLORS[type] = color + LGraphCanvas.DEFAULT_CONNECTION_COLORS_BY_TYPE[type] = color } // Distinguish frontend/backend connections diff --git a/src/lib/nodes/ComfyReroute.ts b/src/lib/nodes/ComfyReroute.ts index 57d4e46..6ad042b 100644 --- a/src/lib/nodes/ComfyReroute.ts +++ b/src/lib/nodes/ComfyReroute.ts @@ -137,7 +137,7 @@ export default class ComfyReroute extends ComfyGraphNode { } const displayType = inputType || outputType || "*"; - const color = LGraphCanvas.link_type_colors[displayType]; + const color = LGraphCanvas.DEFAULT_LINK_TYPE_COLORS[displayType]; // Update the types of each node for (const node of updateNodes) {