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
681 stars 127 forks source link

Regression in 3.7.0: setPointOnViewerCenter no longer centers viewer on point #169

Closed yann-combarnous closed 4 years ago

yann-combarnous commented 4 years ago

Bug reports:

When trying to center and zoom on point that was clicked, 3.7.0 introduced a regression compared to 3.6.0 and below.

Steps to reproduce:

Fiddle links to reproduce:

yann-combarnous commented 4 years ago

Looking further into it, ViewerMouseEvent provides correct (x,y) coordinates on first click, and wrong ones for second onward.

chrvadala commented 4 years ago

Fixed with 3.7.1