mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
use animation frames for memory autoplay (#2771)
The current implementation mixes intervals and animation frames, which is a little convoluted. The use of intervals means that the animation is not going to be smooth and may have strange behaviour when the window is moved to the background. It's possible that the current animation frames could pile up and run all at once which would be undesirable. Moving everything into animation frames means the code is simpler and easier to reason about. It should also be more performant and less buggy. Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
parent
77fe2e55be
commit
43ffcf7e8f
2 changed files with 112 additions and 144 deletions
|
|
@ -70,7 +70,7 @@
|
|||
{#each memoryLane as memory, i (memory.title)}
|
||||
<button
|
||||
class="memory-card relative inline-block mr-8 rounded-xl aspect-video h-[215px]"
|
||||
on:click={() => goto(`/memory?index=${i}`)}
|
||||
on:click={() => goto(`/memory?memory=${i}`)}
|
||||
>
|
||||
<img
|
||||
class="rounded-xl h-full w-full object-cover"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue