Fix right click not working for some users.
This commit is contained in:
parent
c97be4db91
commit
5d5c320054
|
@ -1010,7 +1010,7 @@ function addConvertToGroupOptions() {
|
|||
const getCanvasMenuOptions = LGraphCanvas.prototype.getCanvasMenuOptions;
|
||||
LGraphCanvas.prototype.getCanvasMenuOptions = function () {
|
||||
const options = getCanvasMenuOptions.apply(this, arguments);
|
||||
const index = options.findIndex((o) => o?.content === "Add Group") + 1 || opts.length;
|
||||
const index = options.findIndex((o) => o?.content === "Add Group") + 1 || options.length;
|
||||
addOption(options, index);
|
||||
return options;
|
||||
};
|
||||
|
@ -1020,7 +1020,7 @@ function addConvertToGroupOptions() {
|
|||
LGraphCanvas.prototype.getNodeMenuOptions = function (node) {
|
||||
const options = getNodeMenuOptions.apply(this, arguments);
|
||||
if (!GroupNodeHandler.isGroupNode(node)) {
|
||||
const index = options.findIndex((o) => o?.content === "Outputs") + 1 || opts.length - 1;
|
||||
const index = options.findIndex((o) => o?.content === "Outputs") + 1 || options.length - 1;
|
||||
addOption(options, index);
|
||||
}
|
||||
return options;
|
||||
|
|
Loading…
Reference in New Issue