From 4a21cb2d00a748d20904a18e94ad45724a58e751 Mon Sep 17 00:00:00 2001 From: Thomas <9749173+uhthomas@users.noreply.github.com> Date: Fri, 16 Jun 2023 17:06:38 +0100 Subject: [PATCH] chore(web): hide memory lane navigation when it's no longer possible to scroll (#2791) Fixes: #2790 --- .../components/photos-page/memory-lane.svelte | 70 +++++++++---------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/web/src/lib/components/photos-page/memory-lane.svelte b/web/src/lib/components/photos-page/memory-lane.svelte index 79ae11d174..79dd06657a 100644 --- a/web/src/lib/components/photos-page/memory-lane.svelte +++ b/web/src/lib/components/photos-page/memory-lane.svelte @@ -1,42 +1,36 @@ {#if shouldRender} @@ -45,29 +39,35 @@ bind:this={memoryLaneElement} class="relative overflow-x-hidden whitespace-nowrap mt-5 transition-all" bind:offsetWidth + on:scroll={onScroll} > - {#if isOverflow} + {#if canScrollLeft || canScrollRight}
-
- -
- -
- -
+ {#if canScrollLeft} +
+ +
+ {/if} + {#if canScrollRight} +
+ +
+ {/if}
{/if}
- {#each memoryLane as memory, i (memory.title)} + {#each $memoryStore as memory, i (memory.title)}