Change the default value of the image crop format
Hi, is it possible to change the default value of the image crop format in the editor? Thank you.
Solution:Jump to solution
Hello, I found out why FREE is not activated at startup. It is due to the presence of values in imageResizeTarget. If there are values there, it starts keeping these measurements. So, in fact, it is not a BUG, but rather expected behavior. Once again, I thank you for your help and your time.
15 Replies
Thanks for the answer, but I've already read this page and I can't find how to change the default value. Whenever I click on the editor icon it displays the crop rectangle in a fixed format. I wanted it to be free so the user can crop without maintaining the aspect ratio. Just like you do when you click on FREE crop.
Isn’t the default behavior free form though.? The aspect ratio it just a quick action to set the constraints.
Does ‘livre’ not reset it to free form?
When it starts, it comes with a pattern in which it calculates proportion. If I move it vertically, it changes the width.
Weird. Looks like it’s defaulting to 16:9
So I wanted to change this to free form when you enter the screen. Here everything is updated and it looks like this. Is there a way?
I’m sure there is, but I don’t understand why it’s not defaulting to free form.
I may have done something wrong when calling the component. I'll post my code and if you find something wrong just tell me and I'll change it. Thanks
Hmm. Looks ok to me. My best guess is that it’s falling back to panelAspextRatio() since the default editorAspectRatio is null. On my phone at the moment so can’t really source dive. Could be a possible bug though.
I've tried without panelAspectRatio() and it was the same. For this reason I had to put >imageEditorAspectRatios([null, '1:1', '16:9',]), so the client could choose Free. If you could do a test as soon as possible and see if it's a bug or if it's something here with me, I'd really appreciate it.
I don’t have anything setup with the image editor to even test. Sorry. I wrote the curator plugin because that’s what I use. If you have a reproduction repo you can share I can investigate further, “as soon as possible”
I will create a repository and simulate it. Then I will reply here with the repository link. Thank you very much.
Sounds good. It’s just really difficult for us to determine if it’s a bug or not in your app without a reproduction repo. Thank you.
I understand. I will simulate it here and get back to you. Thanks.
Solution
Hello, I found out why FREE is not activated at startup. It is due to the presence of values in imageResizeTarget. If there are values there, it starts keeping these measurements. So, in fact, it is not a BUG, but rather expected behavior. Once again, I thank you for your help and your time.