Releases: sekoyo/react-image-crop
Releases · sekoyo/react-image-crop
6.0.1
6.0.0
- Typescript package is installed alongside for you convenience
- Module is exported using ES6 exports to resolve eslint issues #178, TypeScript issue with needing to enable
allowSyntheticDefaultImports
, and to enable you to import non-default imports with braces{}
. You should import the default export and any non-defaults in braces like this:
import ReactCrop, { getPixelCrop } from 'react-image-crop'
You shouldn't import the module like this unless you want all the exports in an object:
import * as ReactCrop from 'react-image-crop'
If you use this module globally via a <script>
tag, you should now use ReactCrop.Component
instead of just ReactCrop
.
5.0.0
makeAspectCrop
is no longer necessary, simply pass your incomplete crop (missing width or height) andonChange
will be called with the completed crop for you to set to state. 🎉- Fix exception caused by 4.0.4 change when not initially passing a crop #193
- Fix long-standing issue of crop continuing to move upwards once it's already hit the image boundary and dragging continues when in fixed aspect mode dragging NE or NW handle.
Breaking changes:
- Exported function
containCrop
now takespreviousCrop
as the first parameter.containCrop(previousCrop, crop, imageAspect)
.
4.0.4
4.0.3
4.0.2
4.0.1
4.0.0
- Fixed clicking/touching an unfocused cropping image causing a scroll jump in certain situations #173
$mobile-media-query
is now(max-width: 768px), (pointer: coarse)
by default which catches modern touch devices above 768px.- The cropped image has a
max-height: fill-available
so that the image is contained by it's container's height as well as width (in modern browsers) #174
Note: This release is only a breaking change if you've overridden the $mobile-media-query
scss variable, due to it now being the whole query instead of just a single value without brackets (max-width: 768px
).