Skip to content

Commit

Permalink
Improved timeline; resolved #20; resolved #21
Browse files Browse the repository at this point in the history
  • Loading branch information
broadsw0rd committed Apr 15, 2017
1 parent 14e3a4b commit 44f657e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions dist/dynamica.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ var Animation = function () {
};

Animation.prototype.animate = function animate(time) {
time = (time - this.startTime) / this.duration;
if (time < 1) {
this.handler(this.ease(time));
var t = (time - this.startTime) / this.duration;
if (t < 1) {
this.handler(this.ease(t));
} else {
this.complete(time);
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"rollup": "0.41.6",
"rollup-plugin-babel": "2.7.1",
"sinon": "2.1.0",
"snazzy": "6.0.0",
"snazzy": "7.0.0",
"tap-prettify": "0.0.2",
"tape": "4.6.3",
"uglify-js": "2.8.16"
Expand Down
6 changes: 3 additions & 3 deletions src/dynamica.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ class Animation {
}

animate (time) {
time = (time - this.startTime) / this.duration
if (time < 1) {
this.handler(this.ease(time))
var t = (time - this.startTime) / this.duration
if (t < 1) {
this.handler(this.ease(t))
} else {
this.complete(time)
}
Expand Down

0 comments on commit 44f657e

Please sign in to comment.