diff options
| author | qsm-odoo <qsm@odoo.com> | 2019-09-13 11:57:41 +0000 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2019-09-13 14:55:26 +0000 |
| commit | da95ff210d93da512809d9f917f3e62264d01fe6 (patch) | |
| tree | 6076bd859428f6286962553a7248acf0d51ae1e6 /addons/web_editor/static/src | |
| parent | 3162fb7f2f0c8c8158fa43ca4ff7317fbcef2dcb (diff) | |
[FIX] web_editor: allow better usability to crop all image zones
Before this commit, when rotating an image so that it overflew the
cropper canvas, it was not possible to unzoom on some part of the image.
Now, with the new set of options used by this commit, the cropping zone
and the image can be moved independently allowing to do everything.
Part of https://github.com/odoo/odoo/pull/36880
task-2059480
Diffstat (limited to 'addons/web_editor/static/src')
| -rw-r--r-- | addons/web_editor/static/src/js/wysiwyg/widgets/crop_dialog.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/addons/web_editor/static/src/js/wysiwyg/widgets/crop_dialog.js b/addons/web_editor/static/src/js/wysiwyg/widgets/crop_dialog.js index 19623d05f5e..3c8e653f366 100644 --- a/addons/web_editor/static/src/js/wysiwyg/widgets/crop_dialog.js +++ b/addons/web_editor/static/src/js/wysiwyg/widgets/crop_dialog.js @@ -116,8 +116,9 @@ var CropImageDialog = Dialog.extend({ } } this.$cropperImage.cropper({ - viewMode: 1, - autoCropArea: 1, + viewMode: 2, + dragMode: 'move', + autoCropArea: 1.0, aspectRatio: ratio, data: _.pick(data, 'x', 'y', 'width', 'height', 'rotate', 'scaleX', 'scaleY') }); |
