Skip to content
This repository has been archived by the owner on Dec 2, 2019. It is now read-only.

behavior of demo/node_editor.c #706

Open
wtholliday opened this issue Jun 26, 2018 · 1 comment
Open

behavior of demo/node_editor.c #706

wtholliday opened this issue Jun 26, 2018 · 1 comment

Comments

@wtholliday
Copy link

I was trying out the node_editor demo and noticed that when I position two nodes on top of each other, dragging will sometimes move the one behind.

This seems to be a consequence of the event-handling order being the same as the draw order. In general, it seems an immediate mode gui that returns booleans indicating if something was clicked/dragged would have the problem of the widget drawn in the back (first) getting the first crack at events.

Also, when dragging a node over another node, sometimes it will switch to dragging the other node during the drag.

How would one go about fixing these things?

@EvilPudding
Copy link

I reported something similar in #657 which @vurtun fixed, you can check the commits to see if it applies.

I too have been playing with the node editor, and it also happens that if you are dragging a window and go over a node output, you start linking that output. This seems like it could be easily fixed by keeping track of which window is being grabbed and not propagating any other mouse events while dragging. This can also be fixed on the node_editor code, separate the while loop into two loops, one for drawing, one for dragging and make the windows not draggable so you can override the event.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants