Skip to content

Commit

Permalink
v0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
kmdjs committed Jun 3, 2016
1 parent b2eae6f commit 1a7594a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
15 changes: 10 additions & 5 deletions dev/js/to.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,16 @@ To.prototype = {
},
tick:function(currentTime){
var dt = currentTime - this.startTime;

if(this.timeOut&&dt<=this.time&&dt>=0){
if(dt===0) this.onStart(this.startVaule);
if(dt===this.time)this.onEnd(this.value);
this.timeOut=false;
if(this.timeOut){
if(dt<=this.time&&dt>=0) {
if (dt === 0) this.onStart(this.startVaule);
if (dt === this.time)this.onEnd(this.value);
this.timeOut = false;
}else if(dt < 0){
this.obj[this.property] = this.startVaule ;
}else if(dt> this.time){
this.obj[this.property] = this.value;
}
}
if(!this.timeOut) {
if (dt >= this.time) {
Expand Down
15 changes: 10 additions & 5 deletions src/js/to.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,16 @@ To.prototype = {
},
tick:function(currentTime){
var dt = currentTime - this.startTime;

if(this.timeOut&&dt<=this.time&&dt>=0){
if(dt===0) this.onStart(this.startVaule);
if(dt===this.time)this.onEnd(this.value);
this.timeOut=false;
if(this.timeOut){
if(dt<=this.time&&dt>=0) {
if (dt === 0) this.onStart(this.startVaule);
if (dt === this.time)this.onEnd(this.value);
this.timeOut = false;
}else if(dt < 0){
this.obj[this.property] = this.startVaule ;
}else if(dt> this.time){
this.obj[this.property] = this.value;
}
}
if(!this.timeOut) {
if (dt >= this.time) {
Expand Down

0 comments on commit 1a7594a

Please sign in to comment.