Skip to content

Zoom factor reset to current zoom level after calling resize() #462

@enspritz

Description

@enspritz

Maybe I'm using it wrong, but...

Reproduction steps:

  1. i.e. bring up a demo tiger SVG image.
  2. With you input devices, zoom in on the tiger to something definitely > 1x. Also, before or after, manipulate the DOM container of the tiger SVG to change its width/height.
  3. At the JS console, effect the resize:
svgPanZoom.resize()
  1. Attempt to zoom out. Turns out that the current zoom level seems to in effect be reset to 1x, and you can now zoom in and out as though starting fresh, except on a zoomed-in image.

In particular, the user is now able to zoom beyond configured maxZoom. This might also be the case for minZoom.

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