3.0.2 (2022-07-22)
- A bug re-zooming after clicking the close button on non-touch devices when
zoomPreload
is 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
visibility
andopacity
transitions. - An intermittent issue where zooming became disabled by panning in and out at a fast speed.
3.0.1 (2022-06-12)
- Added
prop-types
to thepeerDependencies
.
3.0.0 (2022-01-03)
- Replaced
srcSet
,sizes
,alt
, andtitle
props withimgAttributes
to set the original image's attributes. - Show close button when moveType is set to "drag" on all breakpoints.
- Switched from
setTimeout
toonTransitionEnd
to check that zoomed image has finished fading out.
- This handy CHANGELOG.
- Added
stopPropagation
on touchmove to prevent events below fullscreen modal.
2.1.0 (2021-08-30)
title
prop to add attribute to original image.
2.0.3 (2021-08-05)
- Use
touch-action
CSS property instead ofpreventDefault
to 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
zoomPreload
is true.
2.0.1 (2021-03-12)
- Set the scaled image size based on
naturalWidth
andnaturalHeight
instead ofoffsetWidth
andoffsetHeight
.
2.0.0 (2021-03-03)
- Refactored using React hooks. All versions after 2.0.0 require React v16.8.0 or above.
- Renamed
startsActive
tozoomPreload
hideHint
prop to hide the magnifying glass icon.hideCloseButton
prop to hide the close button on touch devices.width
,height
, andhasSpacer
props 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)
zoomScale
prop to set the size of the zoomed image.startsActive
prop to load the zoomed image on render.
1.2.0 (2020-11-21)
zoomType
prop 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)
moveType
prop 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.css
import 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.