When zoomed in panning up and down triggers onSwipeToClose
When zoomed in panning up and down triggers onSwipeToClose too quickly, because of this it is impossible to pan up and down. And when returning early in onSwipeToClose I can keep panning to what seems infinity in any direction.
Anyone else experiencing the same problem?
This is the code:
<View>
<Gallery
data={[img]}
onSwipeToClose={() => router.back()}
keyExtractor={x => x.thumb}
renderItem={(item) => (
<Image
style={{
objectFit: 'contain',
flex: 1
}}
source={{
uri: item.item.fullsize
}}
/>
)}
/>
</View>
iOS 18.2 Expo 52 RN Gesture handler 2.20.2 Reanimate 3.16.1
Yes, this is quite annoying behaviour. I believe the onSwipeToClose should never be triggered if scale > 1. Currently it's not triggered only if the scaled image's height exceeds the screen height.
scale = 1: can be swiped down to closescale = 2: panning down will close gallery (this is incorrect)scale = 3: won't close because now it exceeds the screen height
| scale = 1 | scale = 2 | scale = 3 |
|---|---|---|
this seems to be fixed. What version are you using? @kolking
@oeddyo the latest v0.4.2, I cannot confirm it's fixed.