Fix issue previewing large image after edit [SCI-8914] (#6143)

This commit is contained in:
wandji 2023-09-06 10:43:51 +01:00 committed by GitHub
parent 3b3e3cdc46
commit dfce1e1382
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View file

@ -370,7 +370,8 @@ var ImageEditorModal = (function() {
$(`.asset[data-asset-id=${data.id}] .attachment-preview img`)
.replaceWith($(res.html).find('.attachment-preview img'));
$(`.asset[data-asset-id=${data.id}]`).closest('.attachments').trigger('reorder');
ActiveStoragePreviews.reloadPreview(`.asset[data-asset-id=${data.id}] .attachment-preview img`);
ActiveStoragePreviews.reloadPreview(`.asset[data-asset-id=${data.id}] .attachment-preview img,
.asset[data-asset-id=${data.id}] .image-container img`);
closeEditor();
}
});

View file

@ -191,6 +191,12 @@
padding: .5em;
width: 100%;
&.processing {
background-image: url("/images/medium/loading.svg");
background-position: center;
background-repeat: no-repeat;
}
img {
max-height: 100%;
max-width: 100%;