-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* start manage * rework for manage * Fix type errors/catch some more ux bugs * moving some stuff around
- Loading branch information
1 parent
b5f25a4
commit c717f46
Showing
24 changed files
with
947 additions
and
656 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<script lang="ts"> | ||
import { onMount } from "svelte"; | ||
export let root = undefined as any; | ||
export let isInViewProp = false; | ||
let isInView = false; | ||
let observer; | ||
let element: HTMLElement; | ||
$: isInView, (isInViewProp = isInView); | ||
const onChangeVisibility = (e: any) => { | ||
isInView = e[0].isIntersecting; | ||
}; | ||
onMount(() => { | ||
let options = { | ||
root: root, | ||
}; | ||
observer = new IntersectionObserver(onChangeVisibility, options); | ||
observer.observe(element); | ||
}); | ||
</script> | ||
|
||
<div class="c" bind:this={element}> | ||
{#if isInView} | ||
<slot /> | ||
{/if} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.