Fix reroute

This commit is contained in:
space-nuko
2023-05-07 21:43:21 -05:00
parent 8e363cdd51
commit c3af1244ae
3 changed files with 6 additions and 6 deletions

View File

@@ -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

View File

@@ -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) {