chrvadala / react-svg-pan-zoom

:eyes: A React component that adds pan and zoom features to SVG
https://chrvadala.github.io/react-svg-pan-zoom/
MIT License
684 stars 126 forks source link

Viewer captures and prevents the mouse back button. #179

Open japgolly opened 4 years ago

japgolly commented 4 years ago

Normally pressing the back button on your mouse is equivalent of hitting the browsers "Back" button. ReactSvgPanZoom doesn't seem to check the mouse button and calls preventDefault() regardless.

Pan should only work on left-clicks. If button != 0 it shouldn't pan, and shouldn't prevent default.

Thank you for awesome library!