Closed fantasydr closed 9 months ago
Hi, thanks for your contribution, but the fix also has a side effect. It prevents the snapping when moving the selection only in one axis.
Hi, thanks for your contribution, but the fix also has a side effect. It prevents the snapping when moving the selection only in one axis.
Oh you're right, it should be || instead of &&. I just updated the branch.
Looks good. Please update the changelog with the fix before I merge it. Thanks!
Looks good. Please update the changelog with the fix before I merge it. Thanks!
Thanks for the review. Updated the changelog file.
📝 Description of the Change
Check the actual movement before apply the snapping correction.
When the snapping correction is enabled, the graph attempts to align the nodes to the grids. However, even if a user merely selects a node, it might still move and snap to the grid. Furthermore, when using grouped nodes, such as comment in the playground example, selecting the comment can inadvertently select many nodes. This can lead to several unintentional movements.
🐛 Possible Drawbacks
Are there any possible side-effects or negative impacts with this code change?
I think not. Users who wish to adjust nodes based on grid size can easily nudge them slightly to achieve the desired alignment.