Set auto-open option in context menu to default

This commit is contained in:
jnyfil 2023-07-05 18:12:46 +09:00
parent a3f9276340
commit 4d1e4a07c0

View File

@ -0,0 +1,17 @@
import {app} from "/scripts/app.js";
app.registerExtension({
name: "Comfy.ContextMenuOptions",
init() {
const ctxMenu = LiteGraph.ContextMenu;
LiteGraph.ContextMenu = function (values, options) {
options.autoopen = true;
const ctx = ctxMenu.call(this, values, options);
return ctx;
}
LiteGraph.ContextMenu.prototype = ctxMenu.prototype;
}
});