Description
Describe the bug
I've got an svg image positioned inside a div whose height is smaller.
I have to load the svg inside the div and show it otherwise panzoom is not able to process it. But since I put a big image inside the div, this one increases its virtual height and y scrollbar appears.
Not a problem anyway.
Now I'm trying to resize the image to fit the height in the viewport but when I use the zoom command something strange happens: the starting point of my image is no longer on y=0 but it's centered in the container.
I tried everything to move the image to the y=0 coordinate but nothing works.
It seems that I have to use the pan command with negative value on y (????).
So I thought that a new focal positioned to 0,0 instead of 50%,50% could work but nothing.
I tried to change the start points (again on 0,0) but nothing.
Is there a bug here?
It seems very similar to issue #672 even if the problem is with the manual zooming, not with the relative command.
Your environment
- Version of panzoom: 4.6.0
- Browser and browser version: any browser (Chrome, Edge, FF, Opera...)
Expected behavior
When I dwarf an image I should be able to set the focal point where the zoom needs to base its process.
Or my panning coordinates shouldn't be affected by the zoom.
Best should be if I could zoom something before loading on the DOM so I can put it where I want.