Fix gesture recognition outside image
This commit is contained in:
@@ -293,13 +293,13 @@ const ImageItem = ({
|
|||||||
)
|
)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<GestureDetector gesture={composedGesture}>
|
||||||
<Animated.View
|
<Animated.View
|
||||||
ref={containerRef}
|
ref={containerRef}
|
||||||
// Necessary to make opacity work for both children together.
|
// Necessary to make opacity work for both children together.
|
||||||
renderToHardwareTextureAndroid
|
renderToHardwareTextureAndroid
|
||||||
style={[styles.container, animatedStyle, {}]}>
|
style={[styles.container, animatedStyle, {}]}>
|
||||||
<ActivityIndicator size="small" color="#FFF" style={styles.loading} />
|
<ActivityIndicator size="small" color="#FFF" style={styles.loading} />
|
||||||
<GestureDetector gesture={composedGesture}>
|
|
||||||
<Image
|
<Image
|
||||||
contentFit="contain"
|
contentFit="contain"
|
||||||
source={{uri: imageSrc.uri}}
|
source={{uri: imageSrc.uri}}
|
||||||
@@ -320,8 +320,8 @@ const ImageItem = ({
|
|||||||
accessibilityIgnoresInvertColors
|
accessibilityIgnoresInvertColors
|
||||||
cachePolicy="memory"
|
cachePolicy="memory"
|
||||||
/>
|
/>
|
||||||
</GestureDetector>
|
|
||||||
</Animated.View>
|
</Animated.View>
|
||||||
|
</GestureDetector>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user