react-responsive-pinch-zoom-pan icon indicating copy to clipboard operation
react-responsive-pinch-zoom-pan copied to clipboard

Pan not working if image is wrapped

Open enekesabel opened this issue 5 years ago • 0 comments

Hello Brad, First of all thanks for this awesome library, it's an out of the box solution for my current project. My problem is that I have to use inline svg instead of image element (I'm creating some kind of a map). The svg is contained in a wrapper element, so my code basically looks like: <PinchZoomPan> <div className="wrapper"> {... svg loaded by some other lib} </div> </PinchZoomPan> Zooming works perfectly, but unfortunately pan seems to be broken.

I managed to fix this with 2 lines, but I'd appreciate if you checked the code since you have a much deeper understanding of this project than me :) Link to PR: https://github.com/bradstiff/react-responsive-pinch-zoom-pan/pull/10

enekesabel avatar Apr 07 '19 07:04 enekesabel