2023-08-07 23:29:36 +00:00
|
|
|
import { app } from "../../scripts/app.js";
|
2023-08-04 20:26:11 +00:00
|
|
|
|
|
|
|
const id = "Comfy.LinkRenderMode";
|
|
|
|
const ext = {
|
|
|
|
name: id,
|
|
|
|
async setup(app) {
|
|
|
|
app.ui.settings.addSetting({
|
|
|
|
id,
|
|
|
|
name: "Link Render Mode",
|
|
|
|
defaultValue: 2,
|
|
|
|
type: "combo",
|
2023-08-09 11:03:30 +00:00
|
|
|
options: [...LiteGraph.LINK_RENDER_MODES, "Hidden"].map((m, i) => ({
|
2023-08-04 20:26:11 +00:00
|
|
|
value: i,
|
|
|
|
text: m,
|
|
|
|
selected: i == app.canvas.links_render_mode,
|
|
|
|
})),
|
|
|
|
onChange(value) {
|
|
|
|
app.canvas.links_render_mode = +value;
|
|
|
|
app.graph.setDirtyCanvas(true);
|
|
|
|
},
|
|
|
|
});
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
app.registerExtension(ext);
|