Comfy-Org / litegraph.js

A graph node engine and editor written in Javascript similar to PD or UDK Blueprints, comes with its own editor in HTML5 Canvas2D. The engine can run client side or server side using Node. It allows to export graphs as JSONs to be included in applications independently.
MIT License
57 stars 15 forks source link

[Bug]: Show group titles above #286

Open rhdunn opened 6 days ago

rhdunn commented 6 days ago

Frontend Version

1.3.26

Expected Behavior

When a noodle/wire passes over a group title, the title text should be clearly visible.

Actual Behavior

When a noodle/wire passes over a group title, the title text is obscured as the noodle is displayed above the group title.

Steps to Reproduce

image

workflow.json

Debug Logs

n/a

Browser Logs

n/a

Setting JSON

{
    "Comfy.NodeLibrary.Bookmarks": [],
    "Comfy.LinkRenderMode": 2,
    "Comfy.UseNewMenu": "Top"
}

What browsers do you use to access the UI ?

Mozilla Firefox

Other

This is more apparent when creating large/complex workflows.

webfiltered commented 6 days ago

There are solutions, but none of them elegant. I'll put in something ugly but extension-friendly.

rhdunn commented 6 days ago

You could have multiple rendering passes:

That would likely be the cleanest approach.

webfiltered commented 6 days ago

I meant the solutions to do this without breaking monkey patches out in the wild are not elegant.

There are already multiple passes. But simply splitting the group render into two phases isn't enough to get legible text: image

Edit: worth noting.. I accidentally increased the opacity of the title bar, and it's still bad (railing on my own attempt here, not your suggestion). There is a change planned for groups - this could be added as a goal to that.