When more than one gallery/image are placed on the same page several issues occur. As they are closely related and a PR to fix them follows, I put them as one issue here. Let me know if I should split these.
Standalone images(actually galleries containing one image) may get the same uid as galleries with multiple images.
Clicked image index is calculated from all Photoswipe elements on a page, not from specific gallery. That may be the cause for #29 issue.
Photoswipe slides(items) are calculated each time an image is clicked(and Photoswipe initiated) and Photoswipe object is saved in an array for no obvious appliance. The array grows with every image click and is not used for any specific purpose. To observe this behavior, one can place console.log(Backdrop.behaviour.photoswipe) at the end of openPhotoSwipe function and check console output after each image click/Photoswipe initiation.
When more than one gallery/image are placed on the same page several issues occur. As they are closely related and a PR to fix them follows, I put them as one issue here. Let me know if I should split these.