Skip to content

armgit / anime

Public Imported from GitHub
0

JavaScript animation engine

Set progress to duration instead of 0 when reversed

Johan Nordbergdf81656741c2
diff --git a/src/index.js b/src/index.js
index 7caf091c..43f42840 100644
--- a/src/index.js
+++ b/src/index.js
@@ -1093,7 +1093,7 @@ function anime(params = {}) {
childrenLength = children.length;
for (let i = childrenLength; i--;) instance.children[i].reset();
if (instance.reversed && instance.loop !== true || (direction === 'alternate' && instance.loop === 1)) instance.remaining++;
- setAnimationsProgress(0);
+ setAnimationsProgress(instance.reversed ? instance.duration : 0);
}
// Set Value helper