MOBILE-2693 data: Fix broken image after updating a picture field
parent
2537e06a24
commit
c54d061e55
|
@ -124,13 +124,12 @@ export class AddonModDataFieldPictureComponent extends AddonModDataFieldPluginCo
|
||||||
this.entryId = (value && value.recordid) || null;
|
this.entryId = (value && value.recordid) || null;
|
||||||
this.title = (value && value.content1) || '';
|
this.title = (value && value.content1) || '';
|
||||||
this.imageUrl = null;
|
this.imageUrl = null;
|
||||||
|
setTimeout(() => {
|
||||||
if (this.image) {
|
if (this.image) {
|
||||||
if (this.image.offline) {
|
this.imageUrl = this.image.offline ? this.image.toURL() : this.image.fileurl;
|
||||||
this.imageUrl = (this.image && this.image.toURL()) || null;
|
|
||||||
} else {
|
|
||||||
this.imageUrl = (this.image && this.image.fileurl) || null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}, 1);
|
||||||
|
|
||||||
this.width = this.domUtils.formatPixelsSize(this.field.param1);
|
this.width = this.domUtils.formatPixelsSize(this.field.param1);
|
||||||
this.height = this.domUtils.formatPixelsSize(this.field.param2);
|
this.height = this.domUtils.formatPixelsSize(this.field.param2);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue