diff --git a/documentation/index.html b/documentation/index.html index 94a5e7aa..180115ac 100644 --- a/documentation/index.html +++ b/documentation/index.html @@ -2687,7 +2687,10 @@

Reverse

easing: 'easeInOutSine' }); -document.querySelector('.reverse-anim-demo .reverse').onclick = animation.reverse; +document.querySelector('.reverse-anim-demo .reverse').onclick = () => { + animation.reverse(); + animation.play(); +} /*DEMO*/ } diff --git a/src/index.js b/src/index.js index e90d050d..27d959c4 100644 --- a/src/index.js +++ b/src/index.js @@ -1115,6 +1115,7 @@ function anime(params = {}) { instance.reverse = function() { toggleInstanceDirection(); + instance.completed = instance.reversed ? false : true; resetTime(); }