forked from extern/egroupware
Fix avatar cropper gets closed right after uploading an image
This commit is contained in:
parent
98584884b0
commit
44e2938d05
@ -299,6 +299,8 @@ export class Et2Avatar extends Et2Widget(SlotMixin(SlAvatar)) implements et2_IDe
|
||||
let widget = document.getElementById('_cropper_image');
|
||||
switch(_buttons)
|
||||
{
|
||||
case 0:
|
||||
return true;
|
||||
case 1:
|
||||
let canvas = jQuery(widget._imageNode).cropper('getCroppedCanvas');
|
||||
this.image = canvas.toDataURL("image/jpeg", 1.0)
|
||||
@ -315,6 +317,8 @@ export class Et2Avatar extends Et2Widget(SlotMixin(SlAvatar)) implements et2_IDe
|
||||
case '_rotate_r':
|
||||
jQuery(widget._imageNode).cropper('rotate', 90);
|
||||
return false;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user