re-add off-screen image hiding
This commit is contained in:
parent
576d3d1dcb
commit
c9fc9451ee
1 changed files with 6 additions and 0 deletions
|
|
@ -107,6 +107,7 @@ export default defineComponent({
|
|||
if (entry.isIntersecting) {
|
||||
element.classList.add("visible");
|
||||
if (!element.src && element.dataset.src) {
|
||||
element.classList.add("displayed");
|
||||
// Queue the image for loading through the global service
|
||||
// Calculate the image's position to prioritize closer images
|
||||
queueImageForLoading(
|
||||
|
|
@ -122,6 +123,8 @@ export default defineComponent({
|
|||
}
|
||||
);
|
||||
}
|
||||
} else {
|
||||
element.classList.remove("visible");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
@ -177,6 +180,9 @@ export interface VideoScrollDef {
|
|||
|
||||
.video-scroll img.visible {
|
||||
visibility: visible !important;
|
||||
}
|
||||
|
||||
.video-scroll img.displayed {
|
||||
opacity: 1 !important;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue