diff --git a/src/components/Scroller/Background.svelte b/src/components/Scroller/Background.svelte index 51229738..7b003e58 100644 --- a/src/components/Scroller/Background.svelte +++ b/src/components/Scroller/Background.svelte @@ -10,24 +10,24 @@ let { index, steps, preload = 1, stackBackground = true }: Props = $props(); - function shouldShowStep(i: number) { + function showStep(i: number) { if (preload === 0) return true; if (stackBackground) return i <= index; return i >= index - preload && i <= index + preload; } - function isStepVisible(i: number) { + function isVisible(i: number) { if (stackBackground) return i <= index; return i === index; } {#each steps as step, i} - {#if shouldShowStep(i)} + {#if showStep(i)}