Releases: advanced-cropper/react-advanced-cropper
Releases · advanced-cropper/react-advanced-cropper
0.15.0
The resizing algorithm was rewritten to give the possibility to define the anchor.
Breaking changes
If you create your own stencil you should probable to rewrite it a little.
Invoking of the resizeCoordinates
method
The invoking of the resizeCoordinates
method should be changed.
You should provide as the first argument the anchor
value. It can be either: "center"
, "west"
, "east"
, "north"
, "south"
, "westNorth"
, "westSouth"
, "eastNorth"
or "eastSouth"
.
I.e instead of:
cropper.resizeCoordinates({
left: -shift.top,
right: -shift.top,
top: -shift.top,
bottom: -shift.top,
});
You should write:
cropper.resizeCoordinates('center', {
left: shift.left,
top: shift.left,
});
Resize options
The option allowedDirections
was removed, its values are calculated from the anchor
value.
The option compensate
now has the default value true
.