fixed dogshit scroll

This commit is contained in:
2026-02-06 15:34:33 +00:00
parent 6aeea0b9eb
commit 6bc5d4b40b

View File

@@ -9,9 +9,8 @@ import { useTemplateRef, onMounted, onBeforeUnmount } from "vue";
const container = useTemplateRef("container"); const container = useTemplateRef("container");
const SPEED = 1; // px per frame const SPEED = 0.5; // px per frame
const PAUSE = 2000; // ms at top/bottom const PAUSE = 2000; // ms at top/bottom
const FRAME_TIME = 50; // ms at top/bottom
let direction = 1; // 1 = down, -1 = up let direction = 1; // 1 = down, -1 = up
let timeoutId; let timeoutId;
@@ -35,6 +34,8 @@ function tick() {
if (reachedBottom || reachedTop) { if (reachedBottom || reachedTop) {
direction *= -1; direction *= -1;
handleHover();
return;
} }
timeoutId = requestAnimationFrame(tick); timeoutId = requestAnimationFrame(tick);