Releases: dominictobias/react-image-crop
Releases · dominictobias/react-image-crop
6.0.1
No functional changes, this is to fix some issues with importing the library.
- Remove
jsnext:main
as most compilers do not transpile node_modules and this was causing exceptions trying to read es6/7 code. - Declare
prop-types
as an external peer dependency.
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
- Fix to global/window export. Regression fix from 4.0.2 regarding how the module was exported specifically if you were consuming this module as a global (e.g. from a CDN).
4.0.2
4.0.1
- Use css
stretch
property rather than deprecatedfill-available
for image max-height
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
).