Strip stray BOM/hidden characters from multiple Python and web source files to normalize file encoding and avoid lint/parse issues. Also bump package version from 1.8.2 to 1.8.3 in pyproject.toml. No functional code changes were made.
18 lines
533 B
JavaScript
18 lines
533 B
JavaScript
import { app } from "../../scripts/app.js";
|
|
import { mxdApi } from "./mxd_api.js";
|
|
|
|
export async function showLoraChooser(event, callback, parentMenu, loras) {
|
|
const canvas = app.canvas;
|
|
if (!loras) {
|
|
loras = ["None", ...(await mxdApi.getLoras().then((items) => items.map((l) => l.file)) )];
|
|
}
|
|
new LiteGraph.ContextMenu(loras, {
|
|
event,
|
|
parentMenu: parentMenu != null ? parentMenu : undefined,
|
|
title: "Choose a LoRA",
|
|
scale: Math.max(1, canvas.ds?.scale ?? 1),
|
|
className: "dark",
|
|
callback,
|
|
});
|
|
}
|