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
6b638c96
Commit
6b638c96
authored
Apr 08, 2023
by
EllangoK
Browse files
matches entry for correct link color
parent
620c0f93
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
web/extensions/core/colorPalette.js
web/extensions/core/colorPalette.js
+14
-1
No files found.
web/extensions/core/colorPalette.js
View file @
6b638c96
...
...
@@ -284,7 +284,20 @@ app.registerExtension({
}
else
{
data
=
inputNode
.
outputs
[
0
];
}
let
nodeType
=
data
.
type
;
const
matchingEntry
=
inputNode
.
outputs
.
find
(
output
=>
{
return
outputNode
.
inputs
.
some
(
input
=>
input
.
type
===
output
.
type
);
});
console
.
log
(
"
matchingEntry:
"
,
matchingEntry
)
const
inputTypes
=
inputNode
.
outputs
.
map
(
output
=>
output
.
type
);
console
.
log
(
"
Input types:
"
,
inputTypes
);
const
outputTypes
=
outputNode
.
inputs
.
map
(
input
=>
input
.
type
);
console
.
log
(
"
Output types:
"
,
outputTypes
);
let
nodeType
=
matchingEntry
.
type
;
color
=
"
#
"
+
Math
.
floor
(
Math
.
random
()
*
16777215
).
toString
(
16
);
color
=
colorPalette
.
colors
.
node_slot
[
nodeType
];
...
...
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