Skip to content

Commit

Permalink
Animation work in subjects list
Browse files Browse the repository at this point in the history
  • Loading branch information
arackaf committed Jan 16, 2023
1 parent c030608 commit 93573c5
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { getContext, onMount } from "svelte";
import { spring } from "svelte/motion";
import { fade } from "svelte/transition";
import { fly } from "svelte/transition";
import type { FullSubject, Subject } from "$data/types";
Expand Down Expand Up @@ -68,15 +68,15 @@
//
</script>

<li style="padding-top: 0; padding-bottom: 0">
<li style="padding-top: 0; padding-bottom: 0" out:fly|local={{ x: 200, duration: 300 }} in:fly|local={{ x: -200, duration: 300 }}>
<div>
<div out:fade|local={{ duration: 300 }} class="padding-bottom-med subjectRow">
<div class="padding-bottom-med subjectRow">
<EditableExpandableLabelDisplay {childSubjects} {expanded} {setExpanded} onEdit={() => editSubject(subject)} item={subject} />
</div>
<div style="height: {height}px; overflow: {hide && !expanded ? 'hidden' : 'unset'};">
<div bind:this={contentEl} style="opacity: {opacity}; transform: translate3d({x}px, {y}px, 0)">
{#if childSubjects.length}
<ul>
<ul out:fly|local={{ x: 200, duration: 300 }} in:fly|local={{ x: -200, duration: 300 }}>
{#each childSubjects as s (s._id)}
<svelte:self subject={s} {editSubject} />
{/each}
Expand Down

1 comment on commit 93573c5

@vercel
Copy link

@vercel vercel bot commented on 93573c5 Jan 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.