This repository has been archived by the owner on Sep 27, 2020. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds a new option "keepAspectRatio", to manage the ability to change the cropped image's aspect ratio.
OLD BEHAVIOUR:
-Android : Aspect ratio il locked to 1:1 if targetWidth and targetHeight are equal or if both are -1, else it is not locked;
-iOS : Aspect ratio is always locked to the one specified by targetWidth:targetHeight
NEW BEHAVIOUR:
-Android AND iOS : If keepAspectRatio!=0, aspect ratio is locked to targetWidth:targetHeight (or 1:1 if they are equal). If KeepAspectRatio==0, the ratio is unlocked and can be modified as desired;
Also, on iOS, it now respects the size specified with targetWidth and targetHeight, instead of starting always with a square cropped image. If -1 is specified on one of the two dimension, that dimension is replaced by the picture corrisponding dimension.
This may be resolving #49, #50, #75 and #76