Repository navigation
Fix typo in drag_node.js to pass correct entity ID (#13142) - #13168
Hirdyansh-bh wants to merge 2 commits into
Conversation
|
Just to be sure that the behavior is right, I verified it manually. I drew a way, dragged one of its nodes directly over its own segments, and confirmed the self-snapping bug is completely gone showing that the 13142.Video.Proof.mp4 |
|
You're right. I checked out purely at the code level, since this is basically just an basic logic fix now, are willing to merge it just to correct the typo, or would you rather close it? (Also for the other PRs! I'll go back and verify the "before" states for those and post updates there.) |
|
though maybe we can simplify away that code? Or at least note in comment that this check is effectively repeat of other checks? really not sure what to do here |
k-yle
left a comment
There was a problem hiding this comment.
since this is basically just an basic logic fix now, are willing to merge it just to correct the typo, or would you rather close it?
we don't want to blindly make changes just because it seems more correct.
making a one line change is easy. the more important part of issue #13142 is to think deeply about the original intention, and the consequences of the change (if any).
|
Fair point. Let me check git blame to see why that check was added originally. If it's completely redundant now with the self-intersection checks, I can just clean up that block instead of keeping dead code around, will update here shortly. |

Fixes #13142
The 4th argument for
geoChooseEdgeisactiveID, which is meant to tell the snapping logic to ignore the feature that is currently being dragged (so it doesn't try to snap to its own edges).Since
endis just a function here,end.idwas passing asundefined, meaning the dragged node's ID was completely missing the exclusion check. Swapping it toentity.idpasses the correct node ID and restores the intended self-snapping prevention.