Lightgallery: Gallery with 2 images slides images in wrong direction

Created on 26 Oct 2015  路  10Comments  路  Source: sachinchoolur/lightGallery

Hi, thanks for developing this plugin.

When I have galleries with just 2 images the sliding animation is using the opposite direction than with 3+. I thought this might be something related to looping the slideshow but it has the same behavior un-looped.

Any advice is appreciated!

$('.lightbox-gallery').lightGallery({
            speed:800,
            loop:true,
            thumbnail:false,
            closable:true,
            hideBarsDelay:2000,
            download:false,
        });

Most helpful comment

@sachinchoolur If I'm not mistaken, the bug lies within these two if statements: https://github.com/sachinchoolur/lightGallery/blob/b02e1d26a4e2da223e4cf1463b04152b631d14b4/src/js/lightgallery.js#L791-L799

Would you mind taking a look?

All 10 comments

In fact, the demo you provide in the current release (v1.2.6) exhibits the same behavior. However, another site I built using v1.1.5 slides correctly, as does your github.io site though I'm not sure which version it is using...

demo/index.html

Same problem here (v1.2.15)! And it happens whether the loop is disabled or not. Are you planning to fix the issue?

@sachinchoolur If I'm not mistaken, the bug lies within these two if statements: https://github.com/sachinchoolur/lightGallery/blob/b02e1d26a4e2da223e4cf1463b04152b631d14b4/src/js/lightgallery.js#L791-L799

Would you mind taking a look?

Still happening on 1.2.21 :frowning:

+1

+1

will pull a fix to this

Which commit to use?

+1, still having this issue

Hi Guys,
Finally, the issue has been fixed. Please use the latest version of lightGallery

Thank you so much for your patience

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tpaksu picture tpaksu  路  9Comments

manouman picture manouman  路  27Comments

arshapro picture arshapro  路  29Comments

MatteoZorro picture MatteoZorro  路  7Comments

dphermes picture dphermes  路  7Comments