From f56868e4fb424727ed98a5defc3078cc8e9a3535 Mon Sep 17 00:00:00 2001 From: Mo Gorhom Date: Wed, 9 Sep 2020 22:03:05 +0200 Subject: [PATCH] fix: updated drop gesture if-conditions --- src/components/bottomSheet/useTransition.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/bottomSheet/useTransition.ts b/src/components/bottomSheet/useTransition.ts index 4e4e8c93..64a17a4f 100644 --- a/src/components/bottomSheet/useTransition.ts +++ b/src/components/bottomSheet/useTransition.ts @@ -116,6 +116,7 @@ export const useTransition = ({ or(isPanning, neq(autoSnapTo, -1)) ); const position = block([ + // debug('current gesture', currentGesture), /** * In case animation get interrupted, we execute the finishTiming node and * set current position the the animated position. @@ -164,11 +165,12 @@ export const useTransition = ({ eq(contentPanGestureState, State.END) ), and( - neq(currentGesture, GESTURE.CONTENT), + eq(currentGesture, GESTURE.HANDLE), eq(handlePanGestureState, State.END) ) ), [ + // debug('gesture end', currentGesture), set( config.toValue, snapPoint(add(currentPosition, translateY), velocityY, snapPoints)