mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-08-04 07:52:46 +08:00
clean state when loading another workflow
This commit is contained in:
@@ -306,6 +306,7 @@ export class ComfyUI {
|
||||
style: { display: "none" },
|
||||
parent: document.body,
|
||||
onchange: () => {
|
||||
app.clean();
|
||||
app.handleFile(fileInput.files[0]);
|
||||
},
|
||||
});
|
||||
@@ -388,8 +389,14 @@ export class ComfyUI {
|
||||
}),
|
||||
$el("button", { textContent: "Load", onclick: () => fileInput.click() }),
|
||||
$el("button", { textContent: "Refresh", onclick: () => app.refreshComboInNodes() }),
|
||||
$el("button", { textContent: "Clear", onclick: () => app.graph.clear() }),
|
||||
$el("button", { textContent: "Load Default", onclick: () => app.loadGraphData() }),
|
||||
$el("button", { textContent: "Clear", onclick: () => {
|
||||
app.clean();
|
||||
app.graph.clear();
|
||||
}}),
|
||||
$el("button", { textContent: "Load Default", onclick: () => {
|
||||
app.clean();
|
||||
app.loadGraphData();
|
||||
}}),
|
||||
]);
|
||||
|
||||
dragElement(this.menuContainer);
|
||||
|
Reference in New Issue
Block a user