Skip to content

Commit

Permalink
fix: updated drop gesture if-conditions (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhom committed Sep 10, 2020
1 parent e359b13 commit 4d6c453
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/bottomSheet/useTransition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 4d6c453

Please sign in to comment.