PhotoSwipe icon indicating copy to clipboard operation
PhotoSwipe copied to clipboard

showHideAnimationType: 'zoom' does not go well with thumbnails which have border radius

Open ianthedev opened this issue 9 months ago • 2 comments

It's more noticeable if thumbnails' border radius is large, such as 20px.

When the zooming in animation starts or when the zooming out animation is about to end, you can see the thumbnail clone, which has no border radius, overlapping the original thumbnail, which has border radius. That does not look good.

ianthedev avatar Mar 19 '25 13:03 ianthedev

Just ran into this too, is there any way to style the clone?

cossssmin avatar May 18 '25 09:05 cossssmin

You can style a clone, but it's quite complicated since the border-radius and scale are changing, the scale of the original image and thumbnail are different, etc. PhotoSwipe intentionally animates only transform and opacity.

In the new version, there will likely be CSS view transitions support that handles complicated morph transitions way better. For now, I would not recommend animating other properties.

dimsemenov avatar May 19 '25 05:05 dimsemenov