Skip to content

Commit

Permalink
fix: threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
Valexr committed Apr 27, 2024
1 parent 8dde4cd commit 02eec76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
let active: string | undefined;
function intersection(section: HTMLElement) {
const observer = new IntersectionObserver(observe, { threshold: 0.5 });
const observer = new IntersectionObserver(observe, { threshold: 1 });
observer.observe(section);
function observe(entries: IntersectionObserverEntry[]) {
const intersecting = entries.find((e) => e.isIntersecting);
Expand Down

0 comments on commit 02eec76

Please sign in to comment.