panzoom
panzoom copied to clipboard
Incorrect calculation of X&Y focal point zooming
Describe the bug
When you specify a focal point on the edge (border) of a scaled image, then reduce the image to MinScale, the image shifts. The shift occurs at the moment of the last scaling, i.e. when Scale becomes MinScale. Once the image is enlarged, it remains shifted.
Your environment
- Version of panzoom - 4.5.1
- Browser and browser version - Chrome 125.0.6422.142
Expected behavior
The image should not shifted.
Actual behavior
The image shifted.
Steps to reproduce
- Initialize the object with {contain: 'inside'}
- Execute zoomToPoint indicating the coordinates on the edge (border) of the scaled image,