Skip to content

Commit 9f2aecf

Browse files
huchenleiChenlei Hu
authored andcommitted
[API Nodes] Apply yellow color to api nodes by default (#3766)
1 parent 1215a23 commit 9f2aecf

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/services/litegraphService.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import {
22
type IContextMenuValue,
3+
LGraphCanvas,
34
LGraphEventMode,
45
LGraphNode,
56
LiteGraph,
@@ -79,6 +80,13 @@ export const useLitegraphService = () => {
7980
this.#addOutputs(ComfyNode.nodeData.outputs)
8081
this.#setInitialSize()
8182
this.serialize_widgets = true
83+
84+
// Mark API Nodes yellow by default to distinguish with other nodes.
85+
if (ComfyNode.nodeData.api_node) {
86+
this.color = LGraphCanvas.node_colors.yellow.color
87+
this.bgcolor = LGraphCanvas.node_colors.yellow.bgcolor
88+
}
89+
8290
void extensionService.invokeExtensionsAsync('nodeCreated', this)
8391
}
8492

0 commit comments

Comments
 (0)