From 4a94f7bd0923661117a127a66dfeb2dbf185ad92 Mon Sep 17 00:00:00 2001 From: Ilia Mashkov Date: Mon, 2 Feb 2026 12:13:58 +0300 Subject: [PATCH] feat(FontListItem): separate isVisible flags into two (partial and fully) --- src/entities/Font/ui/FontListItem/FontListItem.svelte | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/entities/Font/ui/FontListItem/FontListItem.svelte b/src/entities/Font/ui/FontListItem/FontListItem.svelte index 36c546b..af0e7fc 100644 --- a/src/entities/Font/ui/FontListItem/FontListItem.svelte +++ b/src/entities/Font/ui/FontListItem/FontListItem.svelte @@ -19,7 +19,11 @@ interface Props { /** * Is element fully visible */ - isVisible: boolean; + isFullyVisible: boolean; + /** + * Is element partially visible + */ + isPartiallyVisible: boolean; /** * From 0 to 1 */ @@ -30,7 +34,7 @@ interface Props { children: Snippet<[font: UnifiedFont]>; } -const { font, isVisible, proximity, children }: Props = $props(); +const { font, isFullyVisible, isPartiallyVisible, proximity, children }: Props = $props(); const selected = $derived(selectedFontsStore.has(font.id)); let timeoutId = $state(null); @@ -49,7 +53,7 @@ const bloom = new Spring(0, { // Sync spring to proximity for a "Lens" effect $effect(() => { - bloom.target = isVisible ? 1 : 0; + bloom.target = isPartiallyVisible ? 1 : 0; }); $effect(() => {