Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
ComfyUI
Commits
97f3c230
Commit
97f3c230
authored
Mar 13, 2023
by
pythongosssss
Browse files
Fix node link colors
parent
a5d3eb97
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
web/extensions/core/rerouteNode.js
web/extensions/core/rerouteNode.js
+10
-3
No files found.
web/extensions/core/rerouteNode.js
View file @
97f3c230
...
...
@@ -65,7 +65,7 @@ app.registerExtension({
if
(
outputs
.
length
)
{
for
(
const
linkId
of
outputs
)
{
const
link
=
app
.
graph
.
links
[
linkId
];
// When disconnecting sometimes the link is still registered
if
(
!
link
)
continue
;
...
...
@@ -92,14 +92,21 @@ app.registerExtension({
}
}
const
displayType
=
inputType
||
outputType
||
"
*
"
;
// Update the types of each node
for
(
const
node
of
updateNodes
)
{
// If we dont have an input type we are always wildcard but we'll show the output type
// This lets you change the output link to a different type and all nodes will update
node
.
outputs
[
0
].
type
=
inputType
||
"
*
"
;
node
.
__outputType
=
inputType
||
outputType
||
"
*
"
;
node
.
outputs
[
0
].
name
=
node
.
properties
.
showOutputText
?
inputType
||
outputType
||
"
*
"
:
""
;
node
.
__outputType
=
displayType
;
node
.
outputs
[
0
].
name
=
node
.
properties
.
showOutputText
?
displayType
:
""
;
node
.
size
=
node
.
computeSize
();
const
color
=
LGraphCanvas
.
link_type_colors
[
displayType
];
for
(
const
l
of
node
.
outputs
[
0
].
links
||
[])
{
app
.
graph
.
links
[
l
].
color
=
color
;
}
}
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment