Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lightbox-gallery] Can't change swipe effect and turn off fade-in-black effect in Lightbox Gallery for Mobile #450

Open
stbs01 opened this issue Jul 2, 2024 · 3 comments
Assignees
Labels
lightbox-gallery Lightbox Gallery plugin

Comments

@stbs01
Copy link

stbs01 commented Jul 2, 2024

Hi!

I am using a https://github.com/paulmassen/grav-theme-hyde Grav Theme (v0.2.2) with a Premium Lightbox Gallery Plugin (v1.0.6) on a Linux VPS Server. Now I have the following problem with the Lightbox Gallery Plugin:

I can't change the swipe effect and turn off fade-in-black effect in Lightbox Gallery for Mobile.

You can check the website-in-progress here: http://draft.teimur-bek-safiuli.com/

If you go to http://draft.teimur-bek-safiuli.com/works from your smartphone and click on any of the images, and try to swipe left, or right, you will see it. I want to have the same swipe effect as it is now if you see it from your PC.

Thanks for your help!

Best,
Teimur

[email protected]

P.S. I have a pretty experienced guy who helps me to build my artist portfolio website, but here he cant help me anymore, thats why I need your help 🙏🏼

@stbs01 stbs01 added the lightbox-gallery Lightbox Gallery plugin label Jul 2, 2024
@rhukster
Copy link
Member

rhukster commented Jul 2, 2024

lightbox-gallery simply wraps the functionality of GLightbox (https://biati-digital.github.io/glightbox/) in a grav twig templates via ready-to-go modular templates and custom shortcodes. I did not write the orginal JS library so I don't have intimate knowledge about what and why things are different on mobile compared to the desktop view.

Can you confirm that what you are asking is possible even with the default GLightbox? The Docs are available here: https://github.com/biati-digital/glightbox/blob/master/README.md

All i'm doing is passing along any configuration options to the script :lightbox-gallery.php:117 -> getOptions() method:

    protected function getOptions() {
        $options = [];

        $defaults = [
            'selector' => '.glightbox',
            'elements' => null,
            'skin' => 'clean',
            'openEffect' => 'zoom',
            'closeEffect' => 'zoom',
            'slideEffect' => 'slide',
            'moreText' => 'See more',
            'moreLength' => 60,
            'closeButton' => true,
            'touchNavigation' => true,
            'touchFollowAxis' => true,
            'keyboardNavigation' => true,
            'closeOnOutsideClick' => true,
            'startAt' => 0,
            'width' => '900px',
            'height' => '506px',
            'videosWidth' => '960px',
            'descPosition' => 'bottom',
            'loop' => false,
            'zoomable' => true,
            'draggable' => true,
            'dragToleranceX' => 40,
            'dragToleranceY' => 65,
            'dragAutoSnap' => false,
            'preload' => true,
            'autoplayVideos' => true,
            'autofocusVideos' => false,
        ];

        ...

    }

If I'm missing anything that you need to modify to get your desired effect, then i'll gladly add that. Other than that there's not a whole lot I can do from the lightbox-gallery side, it is functionality that has to exist in the GLightbox JS script side.

@stbs01
Copy link
Author

stbs01 commented Jul 2, 2024

Dear @rhukster Thanks again for your answer!

"Can you confirm that what you are asking is possible even with the default GLightbox?"
Actually yes, I need this feature, but on the acquired plugin. Is it possible?

@rhukster
Copy link
Member

rhukster commented Jul 2, 2024

I know you 'want' this feature, but if it's not in the GLightbox script, it won't be supported in lightbox-gallery. As I said lightbox-gallery is a Grav wrapper plugin for the GLightbox script. I don't modify or add functionality that the underlying script doesn't support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lightbox-gallery Lightbox Gallery plugin
Projects
None yet
Development

No branches or pull requests

3 participants