mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-30 19:21:54 +00:00
add option to directly specify input/output color via colorOn&colorOff
This commit is contained in:
@@ -5215,7 +5215,7 @@ LGraphCanvas.prototype.drawNode = function(node, ctx )
|
||||
if ( this.connecting_node && LiteGraph.isValidConnection( slot.type && out_slot.type ) )
|
||||
ctx.globalAlpha = 0.4 * editor_alpha;
|
||||
|
||||
ctx.fillStyle = slot.link != null ? this.default_connection_color.input_on : this.default_connection_color.input_off;
|
||||
ctx.fillStyle = slot.link != null ? (slot.colorOn || this.default_connection_color.input_on) : (slot.colorOff || this.default_connection_color.input_off);
|
||||
|
||||
var pos = node.getConnectionPos( true, i );
|
||||
pos[0] -= node.pos[0];
|
||||
@@ -5261,7 +5261,7 @@ LGraphCanvas.prototype.drawNode = function(node, ctx )
|
||||
if( max_y < pos[1] + LiteGraph.NODE_SLOT_HEIGHT*0.5)
|
||||
max_y = pos[1] + LiteGraph.NODE_SLOT_HEIGHT*0.5;
|
||||
|
||||
ctx.fillStyle = slot.links && slot.links.length ? this.default_connection_color.output_on : this.default_connection_color.output_off;
|
||||
ctx.fillStyle = slot.links && slot.links.length ? (slot.colorOn || this.default_connection_color.output_on) : (slot.colorOff || this.default_connection_color.output_off);
|
||||
ctx.beginPath();
|
||||
//ctx.rect( node.size[0] - 14,i*14,10,10);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user