Skip to content

Commit

Permalink
Merge pull request #5 from bfred-it/patch-1
Browse files Browse the repository at this point in the history
Use requestAnimationFrame
  • Loading branch information
asvd authored Nov 20, 2016
2 parents a248051 + 9a8365f commit 6fe76fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion naturalScroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@

if (animation.n) {
// scheduling the next frame
setTimeout(tick, 1);
(window.requestAnimationFrame || setTimeout)(tick, 1);
} else {
// stopping animation
animation.f[1] = animation.f[2] = 0;
Expand Down

0 comments on commit 6fe76fe

Please sign in to comment.