mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-28 18:22:40 +00:00
[API Nodes] Apply yellow color to api nodes by default (#3766)
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import {
|
import {
|
||||||
type IContextMenuValue,
|
type IContextMenuValue,
|
||||||
|
LGraphCanvas,
|
||||||
LGraphEventMode,
|
LGraphEventMode,
|
||||||
LGraphNode,
|
LGraphNode,
|
||||||
LiteGraph,
|
LiteGraph,
|
||||||
@@ -79,6 +80,13 @@ export const useLitegraphService = () => {
|
|||||||
this.#addOutputs(ComfyNode.nodeData.outputs)
|
this.#addOutputs(ComfyNode.nodeData.outputs)
|
||||||
this.#setInitialSize()
|
this.#setInitialSize()
|
||||||
this.serialize_widgets = true
|
this.serialize_widgets = true
|
||||||
|
|
||||||
|
// Mark API Nodes yellow by default to distinguish with other nodes.
|
||||||
|
if (ComfyNode.nodeData.api_node) {
|
||||||
|
this.color = LGraphCanvas.node_colors.yellow.color
|
||||||
|
this.bgcolor = LGraphCanvas.node_colors.yellow.bgcolor
|
||||||
|
}
|
||||||
|
|
||||||
void extensionService.invokeExtensionsAsync('nodeCreated', this)
|
void extensionService.invokeExtensionsAsync('nodeCreated', this)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user