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
37b70d79
Commit
37b70d79
authored
Mar 16, 2023
by
pythongosssss
Browse files
Made node non collapsable
Fixed color of first input link
parent
97f3c230
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
web/extensions/core/rerouteNode.js
web/extensions/core/rerouteNode.js
+8
-1
No files found.
web/extensions/core/rerouteNode.js
View file @
37b70d79
...
...
@@ -34,6 +34,7 @@ app.registerExtension({
let
currentNode
=
this
;
let
updateNodes
=
[];
let
inputType
=
null
;
let
inputNode
=
null
;
while
(
currentNode
)
{
updateNodes
.
unshift
(
currentNode
);
const
linkId
=
currentNode
.
inputs
[
0
].
link
;
...
...
@@ -46,6 +47,7 @@ app.registerExtension({
currentNode
=
node
;
}
else
{
// We've found the end
inputNode
=
currentNode
;
inputType
=
node
.
outputs
[
link
.
origin_slot
].
type
;
break
;
}
...
...
@@ -93,6 +95,7 @@ app.registerExtension({
}
const
displayType
=
inputType
||
outputType
||
"
*
"
;
const
color
=
LGraphCanvas
.
link_type_colors
[
displayType
];
// Update the types of each node
for
(
const
node
of
updateNodes
)
{
...
...
@@ -103,11 +106,14 @@ app.registerExtension({
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
;
}
}
if
(
inputNode
)
{
app
.
graph
.
links
[
inputNode
.
inputs
[
0
].
link
].
color
=
color
;
}
};
this
.
clone
=
function
()
{
...
...
@@ -173,6 +179,7 @@ app.registerExtension({
Object
.
assign
(
RerouteNode
,
{
title_mode
:
LiteGraph
.
NO_TITLE
,
title
:
"
Reroute
"
,
collapsable
:
false
,
})
);
...
...
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