Skip to content

Commit

Permalink
remove hasScrolled
Browse files Browse the repository at this point in the history
  • Loading branch information
clementroche committed Jun 3, 2024
1 parent eeaa082 commit 717caca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/core/playground/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const lenis = new Lenis({
// },
})
lenis.on('scroll', (e) => {
// console.log(e.userData, e.velocity, e.isScrolling)
console.log(e.velocity, e.isScrolling)
})
window.lenis = lenis

Expand Down
3 changes: 2 additions & 1 deletion packages/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,8 @@ export default class Lenis {
this.velocity = this.animatedScroll - lastScroll
this.direction = Math.sign(this.animatedScroll - lastScroll)
// this.isSmooth = false
this.isScrolling = this.hasScrolled ? 'native' : false
// this.isScrolling = this.hasScrolled ? 'native' : false
this.isScrolling = 'native'
this.emit()

if (this.velocity !== 0) {
Expand Down

0 comments on commit 717caca

Please sign in to comment.