remove ineffective optimization (hide !isIntersecting images)
This commit is contained in:
parent
452cb267fb
commit
70759c7a69
1 changed files with 0 additions and 7 deletions
|
@ -60,7 +60,6 @@ export default defineComponent({
|
|||
entries.forEach((entry) => {
|
||||
const element = entry.target as HTMLImageElement;
|
||||
if (entry.isIntersecting) {
|
||||
element.classList.add("visible");
|
||||
if (!element.src) {
|
||||
element.src = element.dataset.src!;
|
||||
if (element.dataset.direction == "left" || element.dataset.direction == "right") {
|
||||
|
@ -72,8 +71,6 @@ export default defineComponent({
|
|||
element.classList.add("loaded");
|
||||
};
|
||||
}
|
||||
} else {
|
||||
element.classList.remove("visible");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -113,14 +110,10 @@ export interface VideoScrollDef {
|
|||
image-rendering: optimizeSpeed;
|
||||
opacity: 0;
|
||||
transition: opacity .5s;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.loaded {
|
||||
opacity: 1 !important;
|
||||
}
|
||||
|
||||
.visible {
|
||||
visibility: visible !important;
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in a new issue