Skip to content

Commit

Permalink
fix: scrollTo
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangchen915 committed May 13, 2019
1 parent 492a50a commit 3a7424f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scrollTop.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function scrollTop(duration = 30) {
if (stepCount < duration) {
requestAnimationFrame(step);
stepCount++;
scrollTo(0, initialPosition * (1 - 0.25 * Math.pow((1 - Math.cos(stepPI * stepCount)), 2)));
window.scrollTo(0, initialPosition * (1 - 0.25 * Math.pow((1 - Math.cos(stepPI * stepCount)), 2)));
}
}
}
Expand Down

0 comments on commit 3a7424f

Please sign in to comment.