-
Notifications
You must be signed in to change notification settings - Fork 258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IsNodeHovered returns false when MouseClicked[0] is true #149
Comments
Used the following to fix the bug on my side.
and
Not sure why isNodeHovered isn't already doing this. |
Definitely not intended behaviour, since the doc comment in the header says The solution you presented would work, but the code actually already does a similar search for |
@GreedyTactician I sketched out a potential solution in the branch: https://github.com/Nelarius/imnodes/tree/is-node-hovered-fix It implements a "semantic" hover, i.e. the node remains hovered even when the mouse cursor is temporarily outside of the node rectangle when dragging the node around the canvas very rapidly. |
This is better, but one part of the bug remains. -Node Editor selected + hover mouse over node = works -Node Editor not selected + hover mouse over node = works -Node Editor selected + hover mouse over node + click on node = works -Node Editor not selected + hover mouse over node + click on node = does NOT work |
Title is self explanatory. I wanted to see which node the cursor was on when left clicking. It always returns false even when the cursor is over a node.
Interestingly, if a popup is open, everything works as expected.
I think I could use GetSelectedNodes to do what I want (that is what I am looking into now). Regardless, that is beside the point, the behaviour is not what is expected from IsNodeHovered.
The text was updated successfully, but these errors were encountered: