Open shawnmitchell opened 4 years ago
return (
<PanGestureHandler {...gestureHandler}>
<Animated.View
style={{
position: "absolute",
top: 0,
left: 0,
width: TAB_SIZE,
height: TAB_SIZE,
justifyContent: "center",
alignItems: "center",
transform: [{ translateX }, { translateY }],
zIndex
}}
onStartShouldSetResponder={(evt) => evt.nativeEvent.touches.length === 2}
>
<Tab {...{ tab }} />
</Animated.View>
</PanGestureHandler>
);
I tried this, but no luck
return (
<PanGestureHandler
{...gestureHandler}
minPointers={2}
>
<Animated.View
style={{
position: "absolute",
top: 0,
left: 0,
width: TAB_SIZE,
height: TAB_SIZE,
justifyContent: "center",
alignItems: "center",
transform: [{ translateX }, { translateY }],
zIndex
}}
>
<Tab {...{ tab }} />
</Animated.View>
</PanGestureHandler>
);
Wow, super easy!
Wanted this for a case where SortableTabs would be in a scroll view
In the Chrome Tab Sort demo, how would you restrict so that the PanGesture only started if two fingers?
Thanks!