mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-02-17 00:43:48 +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…
Reference in New Issue
Block a user