Skip to content

Commit

Permalink
fix(android): do not double-spring when acting back to position
Browse files Browse the repository at this point in the history
  • Loading branch information
mgcrea committed Dec 12, 2024
1 parent 7d7c523 commit bb189c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Draggable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ export const Draggable: FunctionComponent<PropsWithChildren<DraggableProps>> = (
{
// translateX: offset.x.value,
translateX:
isActive || isSleeping
isActive || isSleeping || isActing
? offset.x.value
: withSpring(offset.x.value, { damping: 100, stiffness: 1000 }),
},
{
// translateY: offset.y.value,
translateY:
isActive || isSleeping
isActive || isSleeping || isActing
? offset.y.value
: withSpring(offset.y.value, { damping: 100, stiffness: 1000 }),
},
Expand Down

0 comments on commit bb189c7

Please sign in to comment.