Andreas Skomski
Andreas Skomski
But does it work in the example? Or you've only adjusted the options in your code? Could be you face the issue which is fixed by https://github.com/dimsemenov/PhotoSwipe/pull/1708 ?
https://github.com/dimsemenov/PhotoSwipe/pull/1476
If you're interested, this project uses PhotoSwipe and has a download button included: https://github.com/andi34/PhotoSwipeGallery
Documented here https://github.com/dimsemenov/PhotoSwipe/blob/master/website/documentation/options.md#loop-boolean-true
https://github.com/andi34/PhotoSwipe Now also affects desktop UI on my fork, found that change in the open Pullrequests, also includes some more Bugfixes and new options. If you like to test: https://codepen.io/andi34/pen/qBZRxgv
From the documentation of options https://photoswipe.com/documentation/options.html > `loop` boolean true > Loop slides when using swipe gesture. If set to `true` you'll be able to swipe from last to first...
Both have same class so all pictures get added by ```javascript var gallery = document.querySelectorAll('.gallery'); ```
Maybe helps: https://github.com/andi34/photobooth/blob/dev/src/js/photoinit.js If I am not wrong, you could init for each query selector simply by: ```javascript initPhotoSwipeFromDOM('.gallery1'); initPhotoSwipeFromDOM('.gallery2'); ``` (Haven't tested to use multiple galleries)
https://github.com/dimsemenov/PhotoSwipe/issues/1631
https://github.com/dimsemenov/PhotoSwipe/blob/b6fdb82ed0b5b635c0943098f3046581a02ead77/website/index.html#L775-L787 Can also be adjusted to check an added class