Skip to content

Commit

Permalink
fix: 动画部分统一原型方法this #104
Browse files Browse the repository at this point in the history
  • Loading branch information
army8735 committed Nov 4, 2020
1 parent d8b51d5 commit 3436204
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
8 changes: 3 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9832,9 +9832,7 @@
framesR = this.framesR,
direction = this.direction,
delay = this.delay,
endDelay = this.endDelay,
__clean = this.__clean,
__fin = this.__fin; // 初始化根据方向确定帧序列
endDelay = this.endDelay; // 初始化根据方向确定帧序列

this.__currentFrames = {
reverse: true,
Expand Down Expand Up @@ -9972,7 +9970,7 @@
if (playCount >= iterations) {
_this2.__finish = true;

__clean(true);
_this2.__clean(true);
}
}
},
Expand Down Expand Up @@ -10017,7 +10015,7 @@
if (_this2.__finish) {
_this2.__finish = false;

__fin();
_this2.__fin();
}

if (_this2.__nextBegin) {
Expand Down
2 changes: 1 addition & 1 deletion index.js.map

Large diffs are not rendered by default.

6 changes: 2 additions & 4 deletions src/animate/Animation.js
Original file line number Diff line number Diff line change
Expand Up @@ -1207,8 +1207,6 @@ class Animation extends Event {
direction,
delay,
endDelay,
__clean,
__fin,
} = this;
// 初始化根据方向确定帧序列
this.__currentFrames = {
Expand Down Expand Up @@ -1327,7 +1325,7 @@ class Animation extends Event {
this.__end = true;
if(playCount >= iterations) {
this.__finish = true;
__clean(true);
this.__clean(true);
}
}
},
Expand Down Expand Up @@ -1362,7 +1360,7 @@ class Animation extends Event {
}
if(this.__finish) {
this.__finish = false;
__fin();
this.__fin();
}
if(this.__nextBegin) {
this.__nextBegin = false;
Expand Down

0 comments on commit 3436204

Please sign in to comment.