Cancel inherited drag velocity on release

Fixkamo-internal
Ya
29 Aprili 2026, 23:10 UTC
Mwandishi
kamo
Ahadi ya
b399696

The drag handler updates the head's motion value with rapid mx.set(nx) calls, which framer-motion uses to compute velocity. When the release path triggered a soft-push (because the dropped position grazed an edge or overlapped a tool window), the corrective spring inherited the drag's high velocity and overshot wildly — heads would "shoot across the page" and land elsewhere, sometimes off-screen. A stationary release worked because velocity decayed to zero first. Pass velocity: 0 in animateAnchorTo so every anchor placement starts from a clean velocity state. Also reset velocity for a follower's initial flight into a cluster (where the head being added may have just been a dragged anchor with momentum).

Mabadiliko yote

Je, unaona nini kuhusu usafiri?

Kila moja ya hizi updates ardhi katika nafasi yako ya kazi moja kwa moja. Kuanza bure na kuangalia kukua wiki baada ya wiki.

Kuwa Huru MileleMtazamo wa bei