mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-22 17:25:40 +03:00
Experiment remove background preview image when image loaded
This commit is contained in:
parent
eb4b22a265
commit
5bb8b3ce29
1 changed files with 4 additions and 0 deletions
|
@ -79,6 +79,10 @@ function Media({ media, showOriginal, autoAnimate, onClick = () => {} }) {
|
|||
// Open original image in new tab
|
||||
window.open(url, '_blank');
|
||||
}}
|
||||
onLoad={(e) => {
|
||||
// Hide background image after image loads
|
||||
e.target.parentElement.style.backgroundImage = 'none';
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue