ui icon indicating copy to clipboard operation
ui copied to clipboard

Carousel.Zoomable.Panzoom.minScale:"cover" zoomed out image weirdness when resizing window / toggling thumbnails

Open twilson90 opened this issue 6 months ago • 3 comments

In the example you posted: https://jsbin.com/zogubiveye/edit?html,output The behaviour just seems really odd and janky, after resizing the window vertically or toggling the thumbnails, you have to zoom in and zoom out to get it to position optimally. Also, a more desirable option would be something akin to object-fit: contain. I want the image to expand to fit inside the container's edges but not outside.

twilson90 avatar Jun 17 '25 10:06 twilson90

Hi,

Do you really want it to work like object-fit: contains? It already works like this by default if the image dimensions exceed the available area. But if the images are smaller, they are not enlarged, but displayed at their actual size. If you want it to work exactly like object-fit: contains, then smaller images would be stretched to fill the area. And the result would be terrible if, for example, a user opened an image as 800x600 on a largeer screen, it would be pixelated and look terrible.

fancyapps avatar Jun 17 '25 19:06 fancyapps

It sounds odd, but I specifically want to show off some animated gifs and they're too small in the frame, I think they present better when scaled up. If not a 'contain' then some way to control the min-width / min-height without breaking the zoom functionality or transitions.

twilson90 avatar Jun 17 '25 21:06 twilson90

Maybe simple add custom dimensions to images by using the data-width and data-height attributes for links.

fancyapps avatar Jul 07 '25 13:07 fancyapps