Skip to content

Releases: advanced-cropper/react-advanced-cropper

0.15.0

26 Oct 10:41
Compare
Choose a tag to compare
0.15.0 Pre-release
Pre-release

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.