Skip to content

Commit

Permalink
fix: comment hardcoded value and add todo
Browse files Browse the repository at this point in the history
  • Loading branch information
felixw committed Sep 21, 2023
1 parent 90bada6 commit 0b0c9c3
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ export class TelekomHeader {

@Listen('scroll', { target: 'document' })
onScroll() {
// 48px is the height of the header, set scrolled when the user scrolls past it
// todo: calculate this value dynamically (for slim header, smaller viewports, etc)
this.scrolled = window.pageYOffset > 48;
this.scrolledBack =
this.pageYOffset !== window.pageYOffset && window.pageYOffset <= 0;
Expand Down

0 comments on commit 0b0c9c3

Please sign in to comment.