francoischalifour / medium-zoom

🔎🖼 A JavaScript library for zooming images like Medium
https://medium-zoom.francoischalifour.com
MIT License
3.58k stars 161 forks source link

Large image never zoom to native size #145

Open X-Ryl669 opened 4 years ago

X-Ryl669 commented 4 years ago

Let's say you have an image that's 3200x2600 (very large). If you use the current plugin with a screen that's smaller than this, the picture will show as a thumbnail (expected and good).

However, once zoomed, it'll only fill the current viewport and does not allow zooming further to the native size. If the initial viewport was close to the window size, the zooming effect does not enlarge anything and it's very frustrating.

In addition, it's not possible to scroll/swipe the picture to reveal the missing part (linked with #93?)

Please notice that it's not like #75, since we actually want to have overflow here.

francoischalifour commented 4 years ago

The library aims to display the image in its entirety to fill the viewport, and not to overflow. This behavior therefore seems to be expected. If I misunderstood, could you please reproduce in this sandbox?

The inability to scroll away might be a bug. Reproducing would help better define expectations.

X-Ryl669 commented 4 years ago

Well, I guess it's a usability issue. In your sandbox, try to use a large picture (like 12MPx one). Once clicked, we should have an option to allow more zoom than the viewport's width, else the zoom effect is useless (it goes from 10 to 12 in the sandbox for me, and I would like it to go from 10 to 100 or so). Once the zoom factor is increased, we should be able to scroll in the picture's frame.

For most picture of interest, they are already like 80% of the viewport width for me on the blog without the plugin, so getting them to 100% is kind of useless to me.