[FIX] web_editor: do 'reset' crop feature when changing ratio
This reverts commit bf64efb5a0.
Indeed, it was in fact necessary as more complex bugs of the library
can appear if we do not reset before. They even do that themself in
their library demo: https://fengyuanchen.github.io/cropperjs/
This commit is contained in:
@@ -1739,6 +1739,7 @@ var CropImageDialog = Dialog.extend({
|
||||
case 'ratio':
|
||||
$option.siblings().removeClass('active');
|
||||
$option.addClass('active');
|
||||
this.$cropperImage.cropper('reset');
|
||||
this.imageData.aspectRatio = $option.data('label');
|
||||
this.$cropperImage.cropper('setAspectRatio', value);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user