From 25d60a2acf059848676d6120b4f4ceb71a0f8db7 Mon Sep 17 00:00:00 2001 From: Xylight Date: Fri, 6 Sep 2024 17:58:49 -0700 Subject: [PATCH] misc: transition image actions --- src/lib/components/ui/ExpandableImage.svelte | 107 ++++++++++--------- 1 file changed, 55 insertions(+), 52 deletions(-) diff --git a/src/lib/components/ui/ExpandableImage.svelte b/src/lib/components/ui/ExpandableImage.svelte index 0cee6850..6252d6b9 100644 --- a/src/lib/components/ui/ExpandableImage.svelte +++ b/src/lib/components/ui/ExpandableImage.svelte @@ -19,8 +19,8 @@ Share, XMark, } from 'svelte-hero-icons' - import { backOut, expoOut } from 'svelte/easing' - import { fade, scale } from 'svelte/transition' + import { backOut, elasticOut, expoOut } from 'svelte/easing' + import { fade, fly, scale } from 'svelte/transition' import { focusTrap } from 'svelte-focus-trap' /** @@ -52,60 +52,63 @@ src={$page.state.openImage} class="w-full object-contain mx-auto my-auto overscroll-contain bg-white dark:bg-zinc-900" class:max-w-screen-md={!zoomed} - transition:scale={{ start: 0.95, easing: backOut, duration: 250 }} + transition:scale={{ start: 0.95, easing: expoOut, duration: 250 }} {alt} /> - e.stopPropagation()} +
- - - - - + + + + + +
{/if}