From bdebebb938d7d920bd12787232b66164cc026bf9 Mon Sep 17 00:00:00 2001 From: "satyajit.happy" Date: Tue, 14 May 2019 16:49:56 +0200 Subject: [PATCH] fix: tweak spring config for animation --- packages/drawer/src/views/Drawer.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/drawer/src/views/Drawer.tsx b/packages/drawer/src/views/Drawer.tsx index 75cc9edb..eba40fd2 100644 --- a/packages/drawer/src/views/Drawer.tsx +++ b/packages/drawer/src/views/Drawer.tsx @@ -59,12 +59,12 @@ const SWIPE_DISTANCE_THRESHOLD_DEFAULT = 60; const SWIPE_DISTANCE_MINIMUM = 5; const SPRING_CONFIG = { - damping: 30, - mass: 0.5, - stiffness: 150, + stiffness: 1000, + damping: 500, + mass: 3, overshootClamping: true, - restSpeedThreshold: 0.001, - restDisplacementThreshold: 0.001, + restDisplacementThreshold: 0.01, + restSpeedThreshold: 0.01, }; type Binary = 0 | 1;