Nelarius / imnodes

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

Fix selection issues with pins overlapping unrelated links. Fix not being able to start new links when there is an existing link on a pin #126

Closed Auburn closed 2 years ago

Auburn commented 2 years ago

Includes changes from https://github.com/Nelarius/imnodes/pull/124

In v0.4 of ImNodes it is possible to start a link on an pin that already has a link. As part of the input handling changes this is no longer possible, attempting to start a new link simply selects the existing link.

If there is a hovered pin a link should only be considered hovered if that link connects to the hovered pin. This avoids issues where if there is a link behind an unrelated hovered pin it would be considered hovered and cause odd interactions.

Auburn commented 2 years ago

I'm happy to leave it as is for now considering you are working on a large refactor. Can always revisit it in the future when it breaks 😛

Nelarius commented 2 years ago

Can always revisit it in the future when it breaks 😛

That sounds like a plan 👍 😄