mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-01-11 10:25:16 +00:00
af32197067
Thank you for adding this feature (linksRenderMode) to core. I would like to add the "Hidden" option (invalid number 3 will just hide the connector lines), so that I can remove that extension from my extension pack to prevent conflicts https://github.com/failfa-st/failfast-comfyui-extensions
26 lines
534 B
JavaScript
26 lines
534 B
JavaScript
import { app } from "../../scripts/app.js";
|
|
|
|
const id = "Comfy.LinkRenderMode";
|
|
const ext = {
|
|
name: id,
|
|
async setup(app) {
|
|
app.ui.settings.addSetting({
|
|
id,
|
|
name: "Link Render Mode",
|
|
defaultValue: 2,
|
|
type: "combo",
|
|
options: [...LiteGraph.LINK_RENDER_MODES, "Hidden"].map((m, i) => ({
|
|
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);
|