Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src_web/comfyui/menu_auto_nest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ app.registerExtension({
parentMenu: ContextMenu | undefined,
node: LGraphNode,
) => {
oldCallback?.(item?.rgthree_originalValue!, options, event, undefined, node);
return oldCallback?.(item?.rgthree_originalValue!, options, event, undefined, node);
};
const [n, v] = logger.infoParts(`Nested folders found (${foldersCount}).`);
console[n]?.(...v);
Expand Down
5 changes: 4 additions & 1 deletion src_web/comfyui/power_lora_loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import type {
SerializedLGraphNode,
Vector2,
AdjustedMouseEvent,
IContextMenuOptions,
} from "typings/litegraph.js";
import type { ComfyObjectInfo, ComfyNodeConstructor } from "typings/comfy.js";
import { RgthreeBaseServerNode } from "./base_node.js";
Expand Down Expand Up @@ -149,7 +150,7 @@ class RgthreePowerLoraLoader extends RgthreeBaseServerNode {
"➕ Add Lora",
(event: AdjustedMouseEvent, pos: Vector2, node: TLGraphNode) => {
rgthreeApi.getLoras().then(loras => {
showLoraChooser(event as PointerEvent, (value: ContextMenuItem|string) => {
showLoraChooser(event as PointerEvent, (value: ContextMenuItem|string, _options: IContextMenuOptions, leafEvent: MouseEvent) => {
if (typeof value === "string") {
if (value.includes('Power Lora Chooser')) {
// new RgthreePowerLoraChooserDialog().show();
Expand All @@ -161,6 +162,8 @@ class RgthreePowerLoraLoader extends RgthreeBaseServerNode {
this.setDirtyCanvas(true, true);
}
}
// If true (Shift held down), keeps the context menu open to allow for selecting multiple LoRAs
return leafEvent.shiftKey;
// }, null, ["⚡️ Power Lora Chooser", ...loras]);
}, null, [...loras]);
});
Expand Down
2 changes: 1 addition & 1 deletion web/comfyui/menu_auto_nest.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ app.registerExtension({
const oldCallback = options.rgthree_originalCallback;
options.callback = undefined;
const newCallback = (item, options, event, parentMenu, node) => {
oldCallback === null || oldCallback === void 0 ? void 0 : oldCallback(item === null || item === void 0 ? void 0 : item.rgthree_originalValue, options, event, undefined, node);
return oldCallback === null || oldCallback === void 0 ? void 0 : oldCallback(item === null || item === void 0 ? void 0 : item.rgthree_originalValue, options, event, undefined, node);
};
const [n, v] = logger.infoParts(`Nested folders found (${foldersCount}).`);
(_d = console[n]) === null || _d === void 0 ? void 0 : _d.call(console, ...v);
Expand Down
3 changes: 2 additions & 1 deletion web/comfyui/power_lora_loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class RgthreePowerLoraLoader extends RgthreeBaseServerNode {
this.widgetButtonSpacer = this.addCustomWidget(new RgthreeDividerWidget({ marginTop: 4, marginBottom: 0, thickness: 0 }));
this.addCustomWidget(new RgthreeBetterButtonWidget("➕ Add Lora", (event, pos, node) => {
rgthreeApi.getLoras().then(loras => {
showLoraChooser(event, (value) => {
showLoraChooser(event, (value, _options, leafEvent) => {
var _b;
if (typeof value === "string") {
if (value.includes('Power Lora Chooser')) {
Expand All @@ -82,6 +82,7 @@ class RgthreePowerLoraLoader extends RgthreeBaseServerNode {
this.setDirtyCanvas(true, true);
}
}
return leafEvent.shiftKey;
}, null, [...loras]);
});
return true;
Expand Down