Delos Chang
Delos Chang

Reputation: 1853

Fancybox 2 -- Stopping resize in gallery

I'm trying to get Fancybox to stop resizing images in the gallery. I have some bigger images which need the scrolling. Here is my current fancybox jQuery:

$('.gallery').fancybox({
            padding: 0,
            scrolling: 'yes',

            openEffect : 'elastic',
            openSpeed  : 150,

            prevEffect : 'fade',
            nextEffect : 'none',
            closeEffect : 'elastic',
            closeSpeed : 100,

            closeBtn  : false,
            arrows    : true,
            nextClick : true,

            helpers : { 
                thumbs : {
                    width  : 50,
                    height : 50
                },
                overlay : {
                    opacity : 0.8
                }
            }
        });

Upvotes: 4

Views: 3776

Answers (2)

christophe
christophe

Reputation: 659

autoScale property works for me.

$('.gallery').fancybox({
    'autoScale':false,
});

Upvotes: 0

JFK
JFK

Reputation: 41143

Set fitToView to false so:

$('.gallery').fancybox({

            fitToView: false, // add this

            padding: 0,
            scrolling: 'yes',

            openEffect : 'elastic',
            openSpeed  : 150,

            prevEffect : 'fade',
            nextEffect : 'none',
            closeEffect : 'elastic',
            closeSpeed : 100,

            closeBtn  : false,
            arrows    : true,
            nextClick : true,

            helpers : { 
                thumbs : {
                    width  : 50,
                    height : 50
                },
                overlay : {
                    opacity : 0.8
                }
            }
        });

Upvotes: 4

Related Questions