cordova-plugin-crop
cordova-plugin-crop copied to clipboard
Lock Square Aspect Ratio
Hi mate,
First of all i would like to thank you for the wonderful plugin. It has been a life saver for me.
I just needed to enquire that can we somehow lock the square aspect ratio of the crop window. As currently if we crop the picture it allows user to change the aspect ratio of crop window.
We are actually using only square photos in our application so to maintain the sanity of the pictures we want to lock the aspect ratio of the crop window
Any help will be greatly appreciated mate.
Regards Vaibhav
Android it is locked. But on iOS crop window is adjustable.
You can check PEPhotoCropEditor's docs and configure the source to do what you need. Here's the instantiation of that class https://github.com/jeduan/cordova-plugin-crop/blob/master/src/ios/CTCrop.m#L36-L44
@vaibhavn1 Did you manage to do this? @jeduan Do you know how this can be done? Been trying to do it but just can't seem figure out what to change and how
Thanks
File CTCrop.m line 46 cropController.keepingCropAspectRatio = YES;
This is resolved in #27
Try install the plugin with "cordova plugin add --save https://github.com/jeduan/cordova-plugin-crop", for get the master branch code.
@jeduan Can we able to edit CTCrop.m, while I want crop seclection full image, instead of aspectRatio
This issue doesn't seem to be fixed for me, on iOS the user is still able to adjust aspect ratio. Anyone else still having troubles here?
See this fork https://github.com/obeza/cordova-plugin-crop-with-ratio by @obeza
redefined width and height error how to solve this issue please give me solution
@John-Henrique If I install https://github.com/obeza/cordova-plugin-crop-with-ratio plugin using CLI it gives the error and closes the CLI.
I get the error as follows:
Failed to restore plugin "cordova-plugin-crop" from config.xml. You might need to try adding it again. Error: Failed to fetch plugin git+https://github.com/obeza/cordova-plugin-crop-with-ratio.git via registry. Probably this is either a connection problem, or plugin spec is incorrect. Check your connection and plugin name/version/URL.
is there any solution for this?
Thanks, Haresh
I get the same error. I even used the --nofetch flag but I get the same error.
Same error here, any news?
replace git+https with https in both config.xml and package.json this working for me