mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-03-23 22:14:42 +01: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
|
// Open original image in new tab
|
||||||
window.open(url, '_blank');
|
window.open(url, '_blank');
|
||||||
}}
|
}}
|
||||||
|
onLoad={(e) => {
|
||||||
|
// Hide background image after image loads
|
||||||
|
e.target.parentElement.style.backgroundImage = 'none';
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Reference in a new issue