blueimp / Gallery

blueimp Gallery is a touch-enabled, responsive and customizable image & video gallery, carousel and lightbox, optimized for both mobile and desktop web browsers. It features swipe, mouse and keyboard navigation, transition effects, slideshow functionality, fullscreen support and on-demand content loading.
https://blueimp.github.io/Gallery/
Other
3.75k stars 984 forks source link

Disable Up and Down transition animations #242

Closed alexookah closed 4 years ago

alexookah commented 4 years ago

Hi I am using this great library, and would like to know if there is a way to disable the up and down transition animations. In order to have only left and right slide gestures to change slides. Is there some option in initialisation that i missed?

blueimp commented 4 years ago

Hi @Alexookah,

if you just wanna disable closing the lightbox on swipe up/down, you can set the option closeOnSwipeUpOrDown to false.

If you want the browser default behavior when swiping up/down, you can set the following CSS styles:

.blueimp-gallery {
    -ms-touch-action: pan-y pinch-zoom;
    touch-action: pan-y pinch-zoom;
}

Hope that helps! Please also provide a description of your use case. ☺️

alexookah commented 4 years ago

Hello @blueimp I am using carousel to initialise the gallery using the following:

blueimp.Gallery(carouselLinks, {
    container: '#blueimp-gallery-carousel',
    carousel: true
})

Check the following videos: https://streamable.com/3szbo0 https://streamable.com/6xlwhb I want to disable the swipes up and down.

The same behaviour was happening also in the demo https://blueimp.github.io/Gallery, but now only left and right swipes are allowed to change images. Has something changed? (I am using the latest version: 2.44.0)

I have already tried closeOnSwipeUpOrDown and the "pan-y pinch zoom" css fix but none seems to change something about the up and down swipes

alexookah commented 4 years ago

I added all the scripts just like the demo and it seems that it now works. I have another problem now. The indicators are duplicate for some reason.

Screenshot 2020-05-17 at 22 49 50 any idea @blueimp ?

alexookah commented 4 years ago

ok. i also found the issue, didnt have the correct order of imported scripts. closing issue