Skip to content

Commit

Permalink
Merge pull request #24 from laurenashpole/release/1.2
Browse files Browse the repository at this point in the history
Zoom on hover, misc package upgrades
  • Loading branch information
laurenashpole authored Nov 20, 2020
2 parents bb6193f + 23087f8 commit 5351061
Show file tree
Hide file tree
Showing 7 changed files with 2,683 additions and 1,731 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ sources | Array | | A list of image sources for using the picture tag to serve t
zoomSrc | String | | URL for the larger zoom image. Falls back to original image src if not defined.
alt | String | | Alternative text for the original image.
moveType | String | pan | `pan` or `drag`. The user behavior for moving zoomed images on non-touch devices.
zoomType | String | click | `click` or `hover`. The zoom behavior for images.
fadeDuration | Number | 150 | Fade transition time in milliseconds. If zooming in on transparent images, set this to `0` for best results.
fullscreenOnMobile | Boolean | false | Enables fullscreen zoomed image on touch devices below a specified breakpoint.
mobileBreakpoint | Number | 640 | The maximum breakpoint for fullscreen zoom image when fullscreenOnMobile is true.
Expand Down
Binary file added demo/public/unsplash3-large.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added demo/public/unsplash3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions demo/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,13 @@ class Demo extends Component {
<h2>Pan Example</h2>
<InnerImageZoom src="unsplash.jpg" zoomSrc="unsplash-large.jpg" fullscreenOnMobile={true} />
</div>
<div style={{ marginBottom: '30px' }}>
<h2>Hover Example</h2>
<InnerImageZoom src="unsplash2.jpg" zoomSrc="unsplash2-large.jpg" zoomType="hover" />
</div>
<div style={{ marginBottom: '30px' }}>
<h2>Drag Example</h2>
<InnerImageZoom src="unsplash2.jpg" zoomSrc="unsplash2-large.jpg" fullscreenOnMobile={true} moveType="drag" />
<InnerImageZoom src="unsplash3.jpg" zoomSrc="unsplash3-large.jpg" fullscreenOnMobile={true} moveType="drag" />
</div>
</div>
);
Expand All @@ -24,4 +28,4 @@ class Demo extends Component {
render(
<Demo />,
document.querySelector('#demo')
);
);
Loading

0 comments on commit 5351061

Please sign in to comment.