Skip to content

armgit / anime

Public Imported from GitHub
0

JavaScript animation engine

Cleanup code

Julian Garnier932ede2653e5
diff --git a/anime.js b/anime.js
index 719e3f90..29a09c48 100644
--- a/anime.js
+++ b/anime.js
@@ -654,7 +654,7 @@
let instance = createNewInstance(params);
instance.reset = function() {
- const iterations = instance.loop;
+ const loops = instance.loop;
const direction = instance.direction;
instance.currentTime = 0;
instance.progress = 0;
@@ -662,7 +662,7 @@
instance.began = false;
instance.completed = false;
instance.reversed = direction === 'reverse';
- instance.remaining = iterations ? iterations : direction === 'alternate' ? 2 : 0;
+ instance.remaining = loops ? loops : (direction === 'alternate') ? 2 : 0;
}
function toggleInstanceDirection() {
@@ -786,7 +786,6 @@
instance.restart = function() {
instance.pause();
instance.reset();
- instance.seek(0);
instance.play();
}
diff --git a/documentation/index.html b/documentation/index.html
index b4e30cc7..f42de58a 100644
--- a/documentation/index.html
+++ b/documentation/index.html
@@ -885,7 +885,7 @@ absoluteOffset
</div>
<script>var timelineParameters = anime.timeline({
direction: 'alternate',
- loop: 'true'
+ loop: true
});
timelineParameters