fix(canvas): drop a card where it snapped, and save a note on the way out
Alignment snapping settled from a fresh computation at release rather than from the frame the user was looking at. Same inputs, but the live Alt state and zoom are read again — so tapping or releasing Alt after the final mouse move handed back a different correction than the one still on screen, and the card jumped on mouseup, which is the mismatch snapping exists to remove. The drop replays the last painted correction instead. That drop was also classified from the raw pointer position while the card had visibly come to rest up to a snap tolerance away — exactly enough to file it on the wrong side of a region edge. It takes the grabbed node from the snapped set now, so where a card lands and where it is filed are the same place. A note's unsaved text is mirrored from its change handler rather than synced in an effect. The unmount save exists for the ways out that never fire blur — a view switch, ReactFlow culling the node, a remote delete — and a passive effect carrying the last keystroke may still be queued when the node goes away, which drops precisely the character the save was there for. `commit` clears the mirror synchronously, so a blur immediately followed by an unmount can't send the same patch twice.
X
xintaofei committed
f240d74c77b53568bbd36e82a97d43f8fbb3a119
Parent: 4136c8f