chrisbateman / impetus

Agnostic utility for adding momentum to anything. It's like iScroll, except not for scrolling. Supports mouse and touch events.
chrisbateman.github.io/impetus
MIT License
487 stars 70 forks source link

Fix infinite ticks when using negative multiplier #37

Open stephg opened 6 years ago

stephg commented 6 years ago

I was using impetus to update scrollLeft and scrollTop of a parent container and thus using a negative multiplier to invert scroll direction.

Then the stop condition for requesting new animation frames was never hit. destroy() can't stop it either - that would be worth a fix too (#31).

GianlucaGuarini commented 5 years ago

This patch solves a really important issue. @chrisbateman have you any plan to merge it anytime soon? Thanks