Skip to content

Commit cd4527b

Browse files
committed
fix: thumbstick
1 parent f6c1bf0 commit cd4527b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/components/bottomSheetDraggableView/BottomSheetDraggableView.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ const BottomSheetDraggableViewComponent = ({
2424
activeOffsetY,
2525
failOffsetX,
2626
failOffsetY,
27+
animatedScrollableState,
2728
} = useBottomSheetInternal();
2829
const { contentPanGestureHandler } = useBottomSheetGestureHandlers();
2930
//#endregion
@@ -59,6 +60,14 @@ const BottomSheetDraggableViewComponent = ({
5960
.enabled(enableContentPanningGesture)
6061
.shouldCancelWhenOutside(false)
6162
.runOnJS(false)
63+
.manualActivation(true)
64+
.onTouchesMove((_, stateManager) => {
65+
if (animatedScrollableState.value.contentOffsetY !== 0) {
66+
stateManager.fail();
67+
return;
68+
}
69+
stateManager.activate();
70+
})
6271
.onStart(contentPanGestureHandler.handleOnStart)
6372
.onChange(contentPanGestureHandler.handleOnChange)
6473
.onEnd(contentPanGestureHandler.handleOnEnd)
@@ -99,6 +108,7 @@ const BottomSheetDraggableViewComponent = ({
99108
failOffsetY,
100109
simultaneousHandlers,
101110
waitFor,
111+
animatedScrollableState,
102112
contentPanGestureHandler.handleOnChange,
103113
contentPanGestureHandler.handleOnEnd,
104114
contentPanGestureHandler.handleOnFinalize,

0 commit comments

Comments
 (0)