Big revamp of the gallery component: code clean-up, performance improvements, bug fixes and new features.
Fix #671 - allow showing an image's caption in the gallery listing with class image-gallery__caption. The class can be added to:
the figcaption element in order to show the same caption in the gallery as in the viewer,
a separate paragraph element in order to show a different, shorter caption in the gallery.
Fix #733 - add variant classes for small and medium-width galleries: image-gallery--small and image-gallery--medium.
Fix zoom icon on hover, and change cursor to zoom-in
Centre captions in viewer
Fix animation on open/close:
improve performance by not triggering a reflow, and
fix jankyness by fixing thumbnail bounds computation and enabling opacity animation
Fix initial layout while gallery is loading
Fix masonry layout in IE9
Fix history restoration: re-open viewer when navigating back after leaving the gallery page with the viewer open, or when visiting a URL with a PhotoSwipe hash (e.g. #&gid=0&pid=1). Note that changing the hash while on the page doesn't do anything at this point (i.e. there's no onhashchange event handler).
Big revamp of the gallery component: code clean-up, performance improvements, bug fixes and new features.
image-gallery__caption
. The class can be added to:figcaption
element in order to show the same caption in the gallery as in the viewer,image-gallery--small
andimage-gallery--medium
.zoom-in
#&gid=0&pid=1
). Note that changing the hash while on the page doesn't do anything at this point (i.e. there's noonhashchange
event handler).