feat(card-sorting): gentler spring animation for locked cards
When a card transitions from being dragged to its locked position in the prefix/suffix grid, use a gentler spring animation to make the transition more visible and pleasing. Animation config: - Locked cards: tension 120, friction 26 (gentle, floaty) - Normal cards: tension 300, friction 30 (snappy, responsive) This allows users to see the card "gently come out of the drag" and smoothly settle into its permanent grid position, rather than snapping there instantly. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -782,10 +782,17 @@ function AnimatedCard({
|
|||||||
// Position and rotation are immediate when dragging or resizing
|
// Position and rotation are immediate when dragging or resizing
|
||||||
return isDragging || isResizing
|
return isDragging || isResizing
|
||||||
},
|
},
|
||||||
config: {
|
config: isCorrectPosition
|
||||||
tension: 300,
|
? {
|
||||||
friction: 30,
|
// Gentler animation when moving to locked position
|
||||||
},
|
tension: 120,
|
||||||
|
friction: 26,
|
||||||
|
}
|
||||||
|
: {
|
||||||
|
// Snappier for normal movements
|
||||||
|
tension: 300,
|
||||||
|
friction: 30,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user