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
62 stars 17 forks source link

[Bug] Flickering on dragging link from primitive node over widgets #326

Open huchenlei opened 1 day ago

huchenlei commented 1 day ago

https://github.com/user-attachments/assets/d959f187-e737-4946-8c99-8bc0d53f4be2

I think we should have 2 widget hover condition, one on the outer square bounding box and one on the inner rounded corner bounding box. There should be no space between these outer bounding boxes. This way we don't get flickering of links when user tries to drag a link over a list of primitive nodes.

webfiltered commented 1 day ago

I might have forgotten to mention it - my thought was that we just remove the 2px gap between widgets.

Sorry to clarify - there's no rounded hitbox. The *left arrow hitbox is also oversized (bad math in the combo / number code) - plan to fix this during clean up of remaining pointer handlers.