This commit is contained in:
Artem Anufrij
2023-02-08 12:37:55 +01:00
commit 3af8005786
152 changed files with 37333 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
<script>
export default {
props: {
item: { covers: {} },
},
methods: {
scrollFunction() {
let element = document.getElementById(this.item._id);
let bounding = element.getBoundingClientRect();
let scrollDown = bounding.top < 56;
let scrollUp =
bounding.top + bounding.height >
(window.innerHeight || document.documentElement.clientHeight);
if (scrollDown) {
element.scrollIntoView({
behavior: "smooth",
block: "start",
});
} else if (scrollUp) {
element.scrollIntoView({
behavior: "smooth",
block: "end",
});
}
},
},
};
</script>