Skip to content

Commit

Permalink
📃 docs: Add TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosjorger committed Aug 18, 2023
1 parent 2cb7192 commit d0ad826
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/utils/scrollEvents.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// TODO: try to use requestAnimationFrame https://developer.mozilla.org/en-US/docs/Web/API/Document/scroll_event
export function reveal() {
const revealElements = document.getElementsByClassName("reveal");
const isScrollingDown = (window.scrollY > (this.lastScrollTop || 0));
Expand All @@ -18,6 +19,7 @@ export function reveal() {
}
this.lastScrollTop = window.scrollY;
}

export function updateLink(section: HTMLElement,sectionId:string ,limit:number) {
const {top,bottom} = section.getBoundingClientRect();
const isInsideTheSection= top<limit && bottom>limit;
Expand Down

0 comments on commit d0ad826

Please sign in to comment.