mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-09-15 05:57:57 +00:00
New menu/workflows fixes (#3900)
* Fix auto queue * Detect added nodes via search * Fix loading workflows * Add button click style
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
import { api } from "./api.js";
|
||||
import { clone } from "./utils.js";
|
||||
|
||||
|
||||
export class ChangeTracker {
|
||||
static MAX_HISTORY = 50;
|
||||
#app;
|
||||
@@ -170,6 +169,17 @@ export class ChangeTracker {
|
||||
return v;
|
||||
};
|
||||
|
||||
// Detects nodes being added via the node search dialog
|
||||
const onNodeAdded = LiteGraph.LGraph.prototype.onNodeAdded;
|
||||
LiteGraph.LGraph.prototype.onNodeAdded = function () {
|
||||
const v = onNodeAdded?.apply(this, arguments);
|
||||
const ct = changeTracker();
|
||||
if (!ct.isOurLoad) {
|
||||
ct.checkState();
|
||||
}
|
||||
return v;
|
||||
};
|
||||
|
||||
// Store node outputs
|
||||
api.addEventListener("executed", ({ detail }) => {
|
||||
const prompt = app.workflowManager.queuedPrompts[detail.prompt_id];
|
||||
|
Reference in New Issue
Block a user