Skip to content

0.15.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@Norserium Norserium released this 26 Oct 10:41
· 34 commits to master since this 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.