ui
ui copied to clipboard
Click to zoom off-center
On click to zoom, the image is zoomed to clicked coordinates, but does not stick to the edges of the viewport, leaving a gap on one side when clicking near the edge of an image. This seems to be unique to v4 and was not the default behavior on v3.
zoomInCentered mentioned from panzoom options page in documentation is also missing from Panzoom.js, not sure if that is part of the problem?
If this is intentional, is there a way to revert to the default zoom behavior on v3?

Hi,
Fancybox v4 supports multiple zoom levels, and drag/zoom boundaries are edges of the original image. So you want these boundaries to be at the edges of the viewport, but, sorry, there is currently no option for that.
Does that really bother you? I'm currently working on the next major version and I might try to add an option to customize that.
Personally, that's what I believe should be the default behavior. As it stands now, you end up with lots of screen real estate left empty, which on small devices doesn't make much sense to me. If you could have an option to revert this behavior back to the way it was on v3, that would be great.
Couple screenshots showing expected behavior, where user clicks on bottom right of image, and image is zoomed into the bottom right corner, but still fills the viewport.

Thanks for your feedback. I thought about it and you are right, this will be the default behavior for v5.
Excellent, look forward to seeing other improvements for v5. Great work, love the script.
Hi,
Well, v5 has been released recently and it should work as expected.