-
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
Internal link refactor #155
base: master
Are you sure you want to change the base?
Conversation
- Replaces the link creation states with ones which only use pin ids. The fact that snapping and unsnapping from pins used just one state made it very difficult to get the interaction management play nice with just pin ids. - The solution was to reimplement the way interaction states are managed.
- A state stack wasn't necessary and introduced needless complexity - This change removes EnableLinKDetachWithDragClick from the code entirely.
- reset unneeded changes in EditorContextCreate() - remove unused <algorithm> include
- render minimap on top of other node editor elements - solve the wiggling minimap link issue
Hi, I gave this a quick test run, these are the things I noted:
|
Thanks for the feedback, really appreciate it! I will definitely look into adding
Yeah, that's a good point. |
@Nelarius Hey there, If I'm reading this PR right, it looks like we'll be able to customize the bezier curve's path from pin-pin? For example, if we have an output pin that needs to travel to an input pin to the left of it, we can make the curve arc upwards instead of connect in a straight line? |
Hey @Nelarius is there any further progress on this update? Getting this and zooming functionality would be a huge upgrade for this library. Without zooming support I'll probably have to switch to a different node library which would be a shame. I have locally merged latest onto the zooming PR and got that working. Also attempted to fix the mouse positioning bugs but not had any success. Any input you have on this would be great! Thanks again |
This pr contributes three things:
EnableLinkDetachWithDragClick
.@Auburn, if you are still around, wondering if you could give this branch a spin. You’ve been very good at spotting broken interaction code, and this branch rewrites everything 😓 I will leave this pr open for a while while I continue my own tests.
More details about each change below.
Move links from the object pool to a vector
This change boils down to
When
BeginNodeEditor
is called, the vector is resized to zero. Links are appended to the vector inImNodes::Link()
. InEndNodeEditor
, we render them. Links are now truly immediate-mode and really simple.Subtle bugs occurring on id reuse, such as this #91 no longer apply to links. The goal is to apply this change for nodes and pins as well.
Rebuild link, node, pin interaction
Remove the EnableLinkDetachWithDragClick attribute flag
Test checklist