Do not activate cropper when the widget is set to readonly

This commit is contained in:
Hadi Nategh 2021-08-16 12:29:56 +02:00
parent 2515d457d5
commit 5f4e910d0d

View File

@ -641,7 +641,7 @@ export class et2_avatar extends et2_image
}
).sendRequest(true);
}
if (this.options.crop)
if (this.options.crop && !this.options.readonly)
{
jQuery(this.image).cropper({
aspectRatio: 1/1,