retyui / react-quick-pinch-zoom

A react component that providing multi-touch gestures for zooming and dragging on any DOM element.
https://react-quick-pinch-zoom.netlify.app/
310 stars 47 forks source link

Dragging doesn't work properly in a popup window #65

Open smeehrrr opened 1 year ago

smeehrrr commented 1 year ago

If you host the QuickPinchZoom component inside of a second window created with window.open, dragging won't work properly - the mouse tracking only works while the mouse is over the primary window. This is consistent with the code using the 'window' global instead of getting the window for the contained element via element.document.defaultView.

retyui commented 1 year ago

@smeehrrr If you have an idea on how to solve it, please submit a PR!

retyui commented 1 year ago

Moreover, you might try a different library: https://github.com/prc5/react-zoom-pan-pinch