fix: hardcode INT/FLOAT dot colors — not defined in LGraphCanvas.link_type_colors

This commit is contained in:
2026-04-04 13:33:41 +02:00
parent bc61033826
commit c252d0b4e3
+4 -2
View File
@@ -210,12 +210,14 @@ app.registerExtension({
const name = keyWidget?.value || this.outputs[0].name;
this.outputs[0].label = `${val} ${name}`;
const slotType = this.outputs[0].type;
const TYPE_COLORS = { "INT": "#3d7eb5", "FLOAT": "#68a468", "BOOLEAN": null };
let color;
if (slotType === "BOOLEAN") {
color = (val === "true") ? "#4caf50" : "#888888";
} else {
color = LGraphCanvas?.link_type_colors?.[slotType]
|| app.canvas?.default_connection_color_byType?.[slotType];
color = TYPE_COLORS[slotType]
?? LGraphCanvas?.link_type_colors?.[slotType]
?? app.canvas?.default_connection_color_byType?.[slotType];
}
if (color) {
this.outputs[0].color_on = color;