Skip to content

Incorrect calculation of X&Y focal point zooming #668

Open
@IgorA100

Description

@IgorA100

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,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions