mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 22:39:39 +00:00
Remove static circular dependency workaround (#734)
Workaround originally implemented when converting to ES modules, but is now redundant. `DEFAULT_EVENT_LINK_COLOR` confirmed unused in code search (litegraph events).
This commit is contained in:
@@ -66,8 +66,6 @@ export class LiteGraphGlobal {
|
||||
WIDGET_SECONDARY_TEXT_COLOR = "#999"
|
||||
|
||||
LINK_COLOR = "#9A9"
|
||||
// TODO: This is a workaround until LGraphCanvas.link_type_colors is no longer static.
|
||||
static DEFAULT_EVENT_LINK_COLOR = "#A86"
|
||||
EVENT_LINK_COLOR = "#A86"
|
||||
CONNECTING_LINK_COLOR = "#AFA"
|
||||
|
||||
@@ -275,15 +273,6 @@ export class LiteGraphGlobal {
|
||||
onNodeTypeRegistered?(type: string, base_class: typeof LGraphNode): void
|
||||
onNodeTypeReplaced?(type: string, base_class: typeof LGraphNode, prev: unknown): void
|
||||
|
||||
// Avoid circular dependency from original single-module
|
||||
static {
|
||||
LGraphCanvas.link_type_colors = {
|
||||
"-1": LiteGraphGlobal.DEFAULT_EVENT_LINK_COLOR,
|
||||
"number": "#AAA",
|
||||
"node": "#DCA",
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Register a node class so it can be listed when the user wants to create a new one
|
||||
* @param type name of the node and path
|
||||
|
||||
Reference in New Issue
Block a user