Releases: xiaolin/react-image-gallery
Infinite swipe support for 2 slide
Fixed the dreaded infinite swipe support when there are only two slides.
Fixed a bug where isFlick
would persist on the next swipe.
Minor code cleanup
Custom rendering of item
renderItem
: Function, custom item rendering-
As a prop on a specific item
[{thumbnail: '...', renderItem: '...'}]
-
As a prop passed into
ImageGallery
to completely override_renderItem
, see original below_renderItem(item) { const onImageError = this.props.onImageError || this._handleImageError return ( <div className='image-gallery-image'> <img src={item.original} alt={item.originalAlt} srcSet={item.srcSet} sizes={item.sizes} onLoad={this.props.onImageLoad} onError={onImageError.bind(this)} /> { item.description && <span className='image-gallery-description'> {item.description} </span> } </div> ) }
-
Usability improvements, and other bug fixes.
Mostly usability improvements, also added new function getCurrentIndex()
Full Screen functionality
New Function
fullScreen()
: activates full screen
New Props
onImageError
: Function,callback(event)
- overrides defaultImage
onThumbnailError
: Function,callback(event)
- overrides defaultImage
Bug fixes
- Fixes image not showing when there was only 1 image.
Other changes
- Ability to override
$ig-*
scss variable #53
Mobile Swipe and more!
This release includes better mobile swipe experience.
Props added includes
infinite
boolean
onPause
function
onPlay
function
I've renamed the scss file so if you were previously using
@import "../node_modules/react-image-gallery/src/ImageGallery";
please update to
@import "../node_modules/react-image-gallery/src/image-gallery";
merged in pull request #43 and #45, and other minor bug fixes.
v0.5.10
Release notes
disableScroll
is now called disableThumbnailScroll
@johannesd
hovering on thumbnails no longer slides by default, use slideOnThumbnailHover={true}
if you want that feature @twanschik