woutervh-/react-pan-and-zoom-hoc

Zooming not on center

JasperDeRoeck opened this issue · 2 comments

We have a large svg map component on which we zoom but it zooms more onto the upper left corner instead of where the mouse pointer is supposed to be. Is there an easy way to set the mouse pointer as the center of the zoom or maybe set the zooming onto a fixed point so it always zooms on the center and not based on the mouse position?

Hi @JasperDeRoeck

Thanks for the feedback. I've published a new version (1.2.0) where the zooming is always focused on the mouse position. It was actually not doing so by error.

Please check it out and confirm if it's working as expected for you.

Closing for housekeeping purposes.