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
947e786c
Commit
947e786c
authored
Mar 03, 2023
by
pythongosssss
Browse files
Restored missing input edit fix
parent
bba14245
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
web/scripts/widgets.js
web/scripts/widgets.js
+16
-0
No files found.
web/scripts/widgets.js
View file @
947e786c
...
@@ -66,6 +66,22 @@ function addMultilineWidget(node, name, defaultVal, app) {
...
@@ -66,6 +66,22 @@ function addMultilineWidget(node, name, defaultVal, app) {
node
.
addCustomWidget
(
widget
);
node
.
addCustomWidget
(
widget
);
app
.
canvas
.
onDrawBackground
=
function
()
{
// Draw node isnt fired once the node is off the screen
// if it goes off screen quickly, the input may not be removed
// this shifts it off screen so it can be moved back if the node is visible.
for
(
let
n
in
app
.
graph
.
_nodes
)
{
n
=
graph
.
_nodes
[
n
];
for
(
let
w
in
n
.
widgets
)
{
let
wid
=
n
.
widgets
[
w
];
if
(
Object
.
hasOwn
(
wid
,
"
inputEl
"
))
{
wid
.
inputEl
.
style
.
left
=
-
8000
+
"
px
"
;
wid
.
inputEl
.
style
.
position
=
"
absolute
"
;
}
}
}
};
node
.
onRemoved
=
function
()
{
node
.
onRemoved
=
function
()
{
// When removing this node we need to remove the input from the DOM
// When removing this node we need to remove the input from the DOM
for
(
let
y
in
this
.
widgets
)
{
for
(
let
y
in
this
.
widgets
)
{
...
...
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