panzoom icon indicating copy to clipboard operation
panzoom copied to clipboard

Incorrect calculation of X&Y focal point zooming

Open IgorA100 opened this issue 8 months ago • 0 comments

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

  1. Initialize the object with {contain: 'inside'}
  2. Execute zoomToPoint indicating the coordinates on the edge (border) of the scaled image,

IgorA100 avatar Jun 08 '24 21:06 IgorA100