A responsive image cropping tool for React
ISC License
Published by DominicTobias about 3 years ago
Note that you should use 9.0.2 (9.0.0 + 9.0.1 are deprecated due to some issues)
The library is now written in Typescript and comes with two breaking changes:
@types/react-image-crop
as the library is now self-documenting..scss
file, the path is now src/ReactCrop.scss
instead of lib/ReactCrop.scss
.There are also two new props:
scale
: For zooming the image in and out. Defaults to 1. Combine with react-zoom-pan-pinch if you want pinch and scroll zooming.rotate
: For rotating the image between -180 to 180. Defaults to 0.Published by DominicTobias over 3 years ago
You can ignore 8.6.11, it does no harm but doesn't fix the issue.
Published by DominicTobias over 3 years ago
⚠️ Edit: This is a breaking change for some SASS users of ReactCrop.scss ⚠️
Apologies this should have been a breaking change. ReactCrop.scss
is now compatible with https://www.npmjs.com/package/sass only, not with the deprecated packages node-sass
or dart-sass
which was done in the process of fixing deprecation warnings for #426
Alternatively if you aren't changing any SCSS variables you can import ReactCrop.css
instead.
sass
library #426.setActive
function instead of .focus
(IE support was dropped and not working properly for a while anyway).Published by DominicTobias over 3 years ago
Published by DominicTobias over 3 years ago
/lib
folder to NPM in 8.6.7
meaning that if you were importing the .scss
file it would've broken. #418Published by DominicTobias over 3 years ago
Published by DominicTobias about 4 years ago
Published by DominicTobias about 4 years ago
This release address three accessibility issues:
Credits to @mskelton
Published by DominicTobias over 4 years ago
Published by DominicTobias over 4 years ago
Do not use this version, it has been deprecated due to a critical bug introduced.
Published by DominicTobias over 4 years ago
Published by DominicTobias-b1 over 4 years ago
Published by DominicTobias over 4 years ago
Fix #346 visual regression in 8.5.0 (background flicker) when crop size becomes 0
Fix #345 dragging crop through 0,0 on mobile looses the crop and you have to start drawing again
Potential fix for #324 where crop box can "reset" back to 0,0 position when touching an edge
#342 Add back 4 side cropping on mobile with a new strategy to keep the corner boxes the same size and hide the others, but invisibly have a wider surface to drag from (defaults to 24px):
Published by DominicTobias almost 5 years ago
Published by DominicTobias almost 5 years ago
Fixes issue of crop being incorrectly determined as invalid if there is margin/padding applied to the image element (P.S you shouldn't be doing this anyway) but also hopefully fixes hard to replicate issue #324
Added event so that custom media (e.g. video) can inform the component when it's loaded so the component can render the initial crop #319 e.g.
<video
onLoadStart={e => {
// You must inform ReactCrop when your media has loaded.
e.target.dispatchEvent(new Event('medialoaded', { bubbles: true }));
}}
Published by DominicTobias almost 5 years ago
lib
was accidentally not published in 8.4.0 and 8.4.1 which contains the .scss file. Fixes #323Published by DominicTobias almost 5 years ago
Published by DominicTobias about 5 years ago
Crop is checked and corrected if invalid on every change. This makes setting aspect crops after the first load simpler especially when using %
crops since you can only specify one of the dimensions and the other will be completed for you (now at any point).
Fix crop flipping over when using min dimensions but not having enough space to satisfy said min dimensions #261
Simplify resizing on touch devices to only have one resize handle on the inside which is a lot larger to make resizing easier #201
Published by DominicTobias about 5 years ago
Published by DominicTobias about 5 years ago
max-height: fill-available
as it was causing the crop not to show when the container was flex or possibly grid. Feel free to add it in your own CSS if you were depending on it #296 #288