allow for custom cropper aspect ration based on image
This commit is contained in:
parent
ebd333b331
commit
bc956803b8
3 changed files with 30 additions and 5 deletions
|
@ -17,6 +17,10 @@ export async function openCropper(opts: CropperOptions): Promise<RNImage> {
|
|||
unstable__openModal({
|
||||
name: 'crop-image',
|
||||
uri: opts.path,
|
||||
dimensions:
|
||||
opts.height && opts.width
|
||||
? {width: opts.width, height: opts.height}
|
||||
: undefined,
|
||||
onSelect: (img?: RNImage) => {
|
||||
if (img) {
|
||||
resolve(img)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue