Nelarius / imnodes

A small, dependency-free node editor for dear imgui
MIT License
2.01k stars 244 forks source link

Fix AttributeFlags_EnableLinkDetachWithDragClick not working #85

Closed Auburn closed 3 years ago

Auburn commented 3 years ago

For AttributeFlags_EnableLinkDetachWithDragClick to work the link and pin need to be considered hovered, with the fixes to hovering this was no longer possible.

To fix this I changed the link to also be considered hovered if the pins of the link are hovered. This fixes the issue and improves on the detach behaviour. Previously it was only possible to detach a link from the left side of a pin (where the link was also underneath the mouse), now it is possible to detach by clicking anywhere on the pin.

Nelarius commented 3 years ago

Fantastic, thanks again for improving the code!