Nelarius / imnodes

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

Snapping to grid, primary grid line coloration #98

Closed Nelarius closed 2 years ago

Nelarius commented 3 years ago

@Web-eWorks made a nice implementation for snapping nodes to the grid: https://github.com/Nelarius/imnodes/pull/72 Opening this issue, so the work doesn't get lost.

The pr would need some work due to merge conflicts. I think it also might be worth experimenting if the snapping the nodes to the grid while clicking and dragging would be a better experience.

Green-Sky commented 3 years ago

any update on this?

Web-eWorks commented 3 years ago

I've not had time to make the final changes to the linked PR so far, but I'll hopefully be able to knock that out over the weekend or next week.

munshkr commented 2 years ago

I took the liberty of rebasing the branch by @Web-eWorks against the current master and solve some conflicts, and it seems to be working fine :) Just wanted to mention this in case someone wants to use it now, even if it's experimental and needs some refactoring. Branch is here.

Nelarius commented 2 years ago

Really cool to see the branch getting updated @munshkr ! 🙌 Would you have any interest in submitting a pr containing the snap-to-grid changes? I am going to spend some time with Imnodes later this week and could take a look at a new pr.

Web-eWorks commented 2 years ago

The existing PR has been rebased and updated, thanks @munshkr for reviving interest in this branch! I've added a few minor UX features as well and addressed all outstanding feedback on the branch (as well as updated the build tooling to allow the examples to be built under Linux).