mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-11-21 21:57:07 +08:00
Set auto-open option in context menu to default
This commit is contained in:
parent
a3f9276340
commit
4d1e4a07c0
17
web/extensions/core/contextMenuOptions.js
Normal file
17
web/extensions/core/contextMenuOptions.js
Normal 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;
|
||||||
|
}
|
||||||
|
});
|
||||||
Loading…
x
Reference in New Issue
Block a user