react-native-image-zoom
react-native-image-zoom copied to clipboard
Zoomed image scroll trigger page scroll too in iOS
I wrapped SVG component in ImageZoom component it's working fine with zoom-in and zoom-out thing. Pan to move is also working fine, but only in iOS while image is zoomed-in and I try to scroll zoomed image vertically, it trigger image scroll as well as page scroll. I don't need to scroll page on this event. In Android it's working perfect, it doesn't trigger page scroll at all in android.
Here's the code:
<ImageZoom
style={{ backgroundColor: "#f7f7f7" }}
cropWidth={width - 20}
cropHeight={500}
imageWidth={1465 * 1.4}
imageHeight={2465}
minScale={0.2}
maxScale={3}
pinchToZoom={true}
pinchToMove={true}
enableCenterFocus={false}
centerOn={{ x: 50, y: -10, scale: 0.2, duration: 0 }}
doubleClickInterval={300}
swipeDownThreshold={1}
onSwipeDown={(val) => {
console.log("onSwipeDown: ",val);
}}
>
<SVGZoom {...this.props} />
</ImageZoom>
Any input for the iOS ?
What if replace SVGZoom to image? Is this problem only happened when using SVGZoom?
@ascoders thanks for the reply.
I checked with simple image too, having same issue of scrolling on iOS. So it's not because of SVGZoom.
What if replace
SVGZoomtoimage? Is this problem only happened when usingSVGZoom?
Yeah the same problem remain with image too. Any idea to solve it?
I have the same issue on iOS and with just an Image component.
@Thomas-Calliweb looks like library owner is not responding at all. and I had to move away from this. :(
@Digant312 thank you for the information :( this lib just do what i want, so close...
@Thomas-Calliweb if you solved vertical scrolling issue for iOS, can you please post here?
@Digant312 I'm sorry but i will do my component differently in a spot where there is no scrolling. Unfortunately, i have no time to debug this. Make it simplier, make it easier :(