ascoders / react-native-image-zoom

react native image pan and zoom
MIT License
639 stars 282 forks source link

Zoom on Android with TouchableOpacity not working #82

Closed karvulf closed 5 years ago

karvulf commented 5 years ago

In my ImageZoom, I have an ImageBackground and inside that, I have a TouchableOpacity. When I click on that without to zoom, it works perfectly. But when I zoom, my TouchableOpacities size doesnt change, so only a part of that is touchable. With the toggle Inspector, you can see clearly that the size didnt change at all. But the backgroundColor of the TouchableOpacity resized. So it might be a bug on Android. On IOS, it doesnt make a difference zooming in with a BackgroundImage that have TouchableOpacities inside.

`<ImageZoom cropWidth={Dimensions.get('screen').width} cropHeight={Dimensions.get('screen').height} imageWidth={imageWidth} imageHeight={imageHeight} style={{ backgroundColor: 'darkred', position: 'absolute', alignItems: 'center', justifyContent: 'flex-start' }}

<ImageBackground source={{ uri: uri }} style={{ width: imageWidth, height: imageHeight }}

<TouchableOpacity onPress={e => alert('hey')} style={{ width: 30, height: 30, backgroundColor: 'green', transform: [{ translateY: 50 }] }} /> `

karvulf commented 5 years ago

Ok it seems to be a bug in react-native, so I close this issue.