[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:
qsm-odoo
2018-06-22 17:09:54 +02:00
parent 27bbcb45ad
commit 6209b12937
@@ -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;