fix: overflow on mobile
This commit is contained in:
parent
e573c70497
commit
e60baa0358
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "aquavox",
|
||||
"version": "2.9.4",
|
||||
"version": "2.9.5",
|
||||
"private": false,
|
||||
"module": "index.ts",
|
||||
"type": "module",
|
||||
|
@ -151,7 +151,7 @@
|
||||
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
||||
<div class={"absolute w-full h-2/3 bottom-0" + (showInteractiveBox ? '' : '-translate-y-48')}
|
||||
<div class={"absolute w-full h-3/4 bottom-0" + (showInteractiveBox ? '' : '-translate-y-48')}
|
||||
style={`z-index: ${showInteractiveBox ? "0" : "50"}`}
|
||||
on:click={handleClick}
|
||||
></div>
|
||||
|
@ -12,7 +12,7 @@
|
||||
const blurRatio = viewportWidth > 640 ? 1 : 1.4;
|
||||
const currentLyricTop = viewportWidth > 640 ? viewportHeight * 0.12 : viewportHeight * 0.05;
|
||||
const deceleration = 0.95; // Velocity decay factor for inertia
|
||||
const minVelocity = 0.1; // Minimum velocity to stop inertia
|
||||
const minVelocity = 0.001; // Minimum velocity to stop inertia
|
||||
document.body.style.overflow = 'hidden';
|
||||
|
||||
// Props
|
||||
@ -37,6 +37,7 @@
|
||||
let lastTime: number = $state(0); // For tracking time between touch moves
|
||||
let velocityY = $state(0); // Vertical scroll velocity
|
||||
let inertiaFrame: number = $state(0); // For storing the requestAnimationFrame reference
|
||||
let inertiaFrameCount: number = $state(0);
|
||||
|
||||
// References to lyric elements
|
||||
let lyricElements: HTMLDivElement[] = $state([]);
|
||||
@ -122,7 +123,7 @@
|
||||
if (scrollingTimeout) clearTimeout(scrollingTimeout);
|
||||
scrollingTimeout = setTimeout(() => {
|
||||
scrolling = false;
|
||||
}, 5000);
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
// Handle the touch start event
|
||||
|
10
packages/web/src/routes/play/[id]/+layout.svelte
Normal file
10
packages/web/src/routes/play/[id]/+layout.svelte
Normal file
@ -0,0 +1,10 @@
|
||||
<script>
|
||||
import '../../../app.css';
|
||||
</script>
|
||||
|
||||
<div
|
||||
class="h-fit min-h-screen w-screen max-w-[100vw] overflow-hidden
|
||||
bg-zinc-50 dark:bg-[#1f1f1f] text-black dark:text-white relative z-0" style="font-family: 'Barlow', sans-serif;"
|
||||
>
|
||||
<slot />
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user