Releases: ethanselzer/react-image-magnify
Upgrade Dependencies
v2.0.6 2.0.6
Support React 16
Release Notes
Support React 16
Attribution
Special thanks to @smashercosmo for creating this release!
Support Touch and Mouse With a Single Component
Breaking Changes
Previous to v2.x, touch and mouse environments were supported by separate components. In v2.x touch and mouse are supported by a single component. To upgrade, change imports of ReactImageMagnifyTouch to the default export. Example:
Change:
import { ReactImageMagnifyTouch } from 'react-image-magnify';
To:
import ReactImageMagnify from 'react-image-magnify';
Release Notes
Support touch and mouse environments with a single export
Correct possible line on shaded lens
Upgrade dependencies
Support CJS, ES6, and UMD module types
Support React 15.5
Release Notes
Support React 15.5
Upgrade dependencies
Convert to yarn
Support Sizes Attribute and Fluid Width Small Image
React Image Magnify now supports a basic responsive image story.
Both small and large images can be configured with srcSet
and sizes
attributes.
Small images may now be configured to be fluid width. Setting isFluidWidth
on the smallImage
prop will scale it to the width of the element containing React Image Magnify.
Correct Press Activation May Not Suppress Page Scrolling Issue
Add Enlarged Image Position Feature
Introduce options for position of enlarged image. Options are beside
and over
. beside
places the enlarged image to the right of the small image. over
places the enlarged image in the same position as the small image. The default for desktop (mouse) environments is beside
and the default for touch environments is over
.
Thanks again to @damien916 for contributing this feature!
Add Support For Image srcset Attribute + Image Class Names
Summary
Add support for applying CSS class names to images and large image container.
Add support for applying srcset attribute to images.
Thanks to @damien916 for contributing this release! ✨💫
Support Touch API
Prop | Type | Required | Default | Description |
---|---|---|---|---|
isActivatedOnTouch |
Boolean | No | false | Activate magnification immediately on touch. |
pressDuration |
Number | No | 500 | Milliseconds to delay press activation (long touch). |
pressMoveThreshold |
Number | No | 5 | Pixels of movement allowed during press activation |
Support Touch
Adds a new component for touch, with an in place enlarged image view. Supports press to pan. Does not interfere with scrolling.