3.0.2 (2022-07-22)
- A bug re-zooming after clicking the close button on non-touch devices when
zoomPreloadis false.
🎉🎉🎉 Special thanks to MaxDAyala for tackling the following:
- A Firefox error when the zoomed image is dragged to the far left of the container.
- The timing of the fade out
visibilityandopacitytransitions. - An intermittent issue where zooming became disabled by panning in and out at a fast speed.
3.0.1 (2022-06-12)
- Added
prop-typesto thepeerDependencies.
3.0.0 (2022-01-03)
- Replaced
srcSet,sizes,alt, andtitleprops withimgAttributesto set the original image's attributes. - Show close button when moveType is set to "drag" on all breakpoints.
- Switched from
setTimeouttoonTransitionEndto check that zoomed image has finished fading out.
- This handy CHANGELOG.
- Added
stopPropagationon touchmove to prevent events below fullscreen modal.
2.1.0 (2021-08-30)
titleprop to add attribute to original image.
2.0.3 (2021-08-05)
- Use
touch-actionCSS property instead ofpreventDefaultto prevent scroll on touchmove and drag.
- Sporadic missing zoom image in fullscreen modal caused by missing dimensions and incorrect positioning.
2.0.2 (2021-06-15)
- Incorrect initial zoom position in fullscreen modal.
- Persist the zoomed image after zoom out if
zoomPreloadis true.
2.0.1 (2021-03-12)
- Set the scaled image size based on
naturalWidthandnaturalHeightinstead ofoffsetWidthandoffsetHeight.
2.0.0 (2021-03-03)
- Refactored using React hooks. All versions after 2.0.0 require React v16.8.0 or above.
- Renamed
startsActivetozoomPreload
hideHintprop to hide the magnifying glass icon.hideCloseButtonprop to hide the close button on touch devices.width,height, andhasSpacerprops to set the original image's width and height attributes and optionally generate a spacer based on those values to avoid cumulative layout shift.- CONTRIBUTING guide.
- ESLint and Prettier formatting.
1.3.0 (2020-11-24)
zoomScaleprop to set the size of the zoomed image.startsActiveprop to load the zoomed image on render.
1.2.0 (2020-11-21)
zoomTypeprop with "hover" option to trigger zoom on hover.
1.1.1 (2020-07-13)
- Removed unnecessary dragend events when image is not zoomed.
1.1.0 (2020-07-12)
moveTypeprop with "drag" option for drag to move functionality on non-touch devices.
1.0.6 (2020-05-22)
- Hide original image on zoom to support transparent zoom images.
1.0.5 (2019-10-15)
- Removed
styles.cssimport from React component to allow for a greater variety of build approaches.
- Minified CSS file
styles.min.css. - "Styling" section in README file.
1.0.0 (2019-06-19)
- InnerImageZoom React component.
- README and LICENSE.