fancybox icon indicating copy to clipboard operation
fancybox copied to clipboard

Zoom opening animation forces the image to resize first before zooming

Open ghost opened this issue 9 years ago • 5 comments

If I open an image and then try to zoom it by clicking on it, instead of zooming the image resizes from decimal to integer number in height and width. If I click it again it zooms normally.

The bug only appears if I leave the default "animationEffect : 'zoom'", if I change it to fade, zoom works normally after the first click.

Hope you could take a look at it, Thanks

ghost avatar Oct 10 '17 19:10 ghost

This hack solved my problem
$(document).on('afterShow.fb', function() { $.fancybox.getInstance().update() })

ghost avatar Oct 10 '17 20:10 ghost

Just do not use jQuery v3.0 and v3.1, these versions have a bug affecting calculations.

fancyapps avatar Oct 11 '17 06:10 fancyapps

I use v3.2.1

ghost avatar Oct 11 '17 07:10 ghost

Then I have no clue.

fancyapps avatar Oct 11 '17 08:10 fancyapps

@shermendev your hack saved my life

intransitorio avatar Nov 04 '17 14:11 intransitorio