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
40a37777
Commit
40a37777
authored
Mar 28, 2023
by
Farid Safi
Browse files
move clean to handleFile and loadGraphData functions
parent
39308487
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
5 deletions
+3
-5
web/scripts/app.js
web/scripts/app.js
+2
-0
web/scripts/ui.js
web/scripts/ui.js
+1
-5
No files found.
web/scripts/app.js
View file @
40a37777
...
@@ -721,6 +721,8 @@ class ComfyApp {
...
@@ -721,6 +721,8 @@ class ComfyApp {
* @param {*} graphData A serialized graph object
* @param {*} graphData A serialized graph object
*/
*/
loadGraphData
(
graphData
)
{
loadGraphData
(
graphData
)
{
this
.
clean
();
if
(
!
graphData
)
{
if
(
!
graphData
)
{
graphData
=
defaultGraph
;
graphData
=
defaultGraph
;
}
}
...
...
web/scripts/ui.js
View file @
40a37777
...
@@ -306,7 +306,6 @@ export class ComfyUI {
...
@@ -306,7 +306,6 @@ export class ComfyUI {
style
:
{
display
:
"
none
"
},
style
:
{
display
:
"
none
"
},
parent
:
document
.
body
,
parent
:
document
.
body
,
onchange
:
()
=>
{
onchange
:
()
=>
{
app
.
clean
();
app
.
handleFile
(
fileInput
.
files
[
0
]);
app
.
handleFile
(
fileInput
.
files
[
0
]);
},
},
});
});
...
@@ -393,10 +392,7 @@ export class ComfyUI {
...
@@ -393,10 +392,7 @@ export class ComfyUI {
app
.
clean
();
app
.
clean
();
app
.
graph
.
clear
();
app
.
graph
.
clear
();
}}),
}}),
$el
(
"
button
"
,
{
textContent
:
"
Load Default
"
,
onclick
:
()
=>
{
$el
(
"
button
"
,
{
textContent
:
"
Load Default
"
,
onclick
:
()
=>
app
.
loadGraphData
()
}),
app
.
clean
();
app
.
loadGraphData
();
}}),
]);
]);
dragElement
(
this
.
menuContainer
);
dragElement
(
this
.
menuContainer
);
...
...
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