I would like to trigger the crop function on page load.
Or even just using a button, is it possible to have a crop button that does the crop?
Right now only direct interaction with the canvas will trigger a crop, I am only trying to enforce a square image, so an instant crop is all that is needed (or a crop on button push).
Thanks for your help,
- Daniel
Hi Daniel,
I recommend using some other forge component for such use case. This forge component is best suited when you need user interaction for deciding what area to be cropped.
If you need an automated result, it would be worth looking on other options that can help you do the cropping of images based on some parameters (like percentage, image ratio, size in px etc.). Here's a range of different cropping tools available in Outsystems Forge: https://www.outsystems.com/forge/list?q=crop&t=&o=most-popular&tr=False&oss=False&c=%20&a=&v=&hd=False&tn=&scat=forge
You can even implement a small version of your own web block / client action to do the job. Here's a bit of reference from stackoverflow to achieve this via javascript: https://stackoverflow.com/questions/53810434/crop-the-image-using-javascript