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
a8315a6f
Commit
a8315a6f
authored
Mar 06, 2023
by
pythongosssss
Browse files
Allow any node to draw images
parent
1ee35fd9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
125 additions
and
132 deletions
+125
-132
web/scripts/app.js
web/scripts/app.js
+125
-132
No files found.
web/scripts/app.js
View file @
a8315a6f
...
...
@@ -123,8 +123,9 @@ class ComfyApp {
}
});
}
}
if
(
this
.
imgs
)
{
if
(
this
.
imgs
&&
this
.
imgs
.
length
)
{
const
canvas
=
graph
.
list_of_graphcanvas
[
0
];
const
mouse
=
canvas
.
graph_mouse
;
if
(
!
canvas
.
pointer_is_down
&&
this
.
pointerDown
)
{
...
...
@@ -226,14 +227,7 @@ class ComfyApp {
ctx
.
drawImage
(
this
.
imgs
[
imageIndex
],
x
,
y
,
w
,
h
);
const
drawButton
=
(
x
,
y
,
sz
,
text
)
=>
{
const
hovered
=
LiteGraph
.
isInsideRectangle
(
mouse
[
0
],
mouse
[
1
],
x
+
this
.
pos
[
0
],
y
+
this
.
pos
[
1
],
sz
,
sz
);
const
hovered
=
LiteGraph
.
isInsideRectangle
(
mouse
[
0
],
mouse
[
1
],
x
+
this
.
pos
[
0
],
y
+
this
.
pos
[
1
],
sz
,
sz
);
let
fill
=
"
#333
"
;
let
textFill
=
"
#fff
"
;
let
isClicking
=
false
;
...
...
@@ -279,7 +273,6 @@ class ComfyApp {
}
}
}
}
};
}
...
...
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