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
682c84cc
"...composable_kernel_onnx.git" did not exist on "e08d68d25d4406864c7f4eb8c389b4247da79713"
Commit
682c84cc
authored
Oct 16, 2023
by
Jairo Correa
Browse files
Fix fit group to nodes with reroute and collapsed nodes
parent
e8c02219
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
web/extensions/core/groupOptions.js
web/extensions/core/groupOptions.js
+13
-1
No files found.
web/extensions/core/groupOptions.js
View file @
682c84cc
...
@@ -22,6 +22,18 @@ function addNodesToGroup(group, nodes=[]) {
...
@@ -22,6 +22,18 @@ function addNodesToGroup(group, nodes=[]) {
nx2
=
node
.
pos
[
0
]
+
node
.
size
[
0
]
nx2
=
node
.
pos
[
0
]
+
node
.
size
[
0
]
ny2
=
node
.
pos
[
1
]
+
node
.
size
[
1
]
ny2
=
node
.
pos
[
1
]
+
node
.
size
[
1
]
if
(
node
.
type
!=
"
Reroute
"
)
{
ny1
-=
LiteGraph
.
NODE_TITLE_HEIGHT
;
}
if
(
node
.
flags
?.
collapsed
)
{
ny2
=
ny1
+
LiteGraph
.
NODE_TITLE_HEIGHT
;
if
(
node
?.
_collapsed_width
)
{
nx2
=
nx1
+
Math
.
round
(
node
.
_collapsed_width
);
}
}
if
(
x1
==
-
1
||
nx1
<
x1
)
{
if
(
x1
==
-
1
||
nx1
<
x1
)
{
x1
=
nx1
;
x1
=
nx1
;
}
}
...
@@ -42,7 +54,7 @@ function addNodesToGroup(group, nodes=[]) {
...
@@ -42,7 +54,7 @@ function addNodesToGroup(group, nodes=[]) {
var
padding
=
10
;
var
padding
=
10
;
y1
=
y1
-
Math
.
round
(
group
.
font_size
*
2.7
);
y1
=
y1
-
Math
.
round
(
group
.
font_size
*
1.4
);
group
.
pos
=
[
x1
-
padding
,
y1
-
padding
];
group
.
pos
=
[
x1
-
padding
,
y1
-
padding
];
group
.
size
=
[
x2
-
x1
+
padding
*
2
,
y2
-
y1
+
padding
*
2
];
group
.
size
=
[
x2
-
x1
+
padding
*
2
,
y2
-
y1
+
padding
*
2
];
...
...
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