Fix reroute
This commit is contained in:
Submodule litegraph updated: e7df2b2b75...a6d94ecb4d
@@ -120,6 +120,8 @@ export default class ComfyApp {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.setupColorScheme()
|
||||||
|
|
||||||
this.rootEl = document.getElementById("app") as HTMLDivElement;
|
this.rootEl = document.getElementById("app") as HTMLDivElement;
|
||||||
this.canvasEl = document.getElementById("graph-canvas") as HTMLCanvasElement;
|
this.canvasEl = document.getElementById("graph-canvas") as HTMLCanvasElement;
|
||||||
this.lGraph = new ComfyGraph();
|
this.lGraph = new ComfyGraph();
|
||||||
@@ -160,8 +162,6 @@ export default class ComfyApp {
|
|||||||
this.addPasteHandler();
|
this.addPasteHandler();
|
||||||
this.addKeyboardHandler();
|
this.addKeyboardHandler();
|
||||||
|
|
||||||
this.setupColorScheme()
|
|
||||||
|
|
||||||
// await this.#invokeExtensionsAsync("setup");
|
// await this.#invokeExtensionsAsync("setup");
|
||||||
|
|
||||||
// Ensure the canvas fills the window
|
// Ensure the canvas fills the window
|
||||||
@@ -346,8 +346,8 @@ export default class ComfyApp {
|
|||||||
|
|
||||||
private setupColorScheme() {
|
private setupColorScheme() {
|
||||||
const setColor = (type: any, color: string) => {
|
const setColor = (type: any, color: string) => {
|
||||||
this.lCanvas.link_type_colors[type] = color
|
LGraphCanvas.DEFAULT_LINK_TYPE_COLORS[type] = color
|
||||||
this.lCanvas.default_connection_color_byType[type] = color
|
LGraphCanvas.DEFAULT_CONNECTION_COLORS_BY_TYPE[type] = color
|
||||||
}
|
}
|
||||||
|
|
||||||
// Distinguish frontend/backend connections
|
// Distinguish frontend/backend connections
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ export default class ComfyReroute extends ComfyGraphNode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const displayType = inputType || outputType || "*";
|
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
|
// Update the types of each node
|
||||||
for (const node of updateNodes) {
|
for (const node of updateNodes) {
|
||||||
|
|||||||
Reference in New Issue
Block a user