File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " rc-tween-one" ,
3
- "version" : " 2.2.18 " ,
3
+ "version" : " 2.2.19 " ,
4
4
"description" : " tween-one anim component for react" ,
5
5
"keywords" : [
6
6
" react" ,
Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ class TweenOne extends Component {
45
45
this . paused = props . paused ;
46
46
this . reverse = props . reverse ;
47
47
this . updateAnim = false ;
48
+ this . repeatNum = 0 ;
48
49
this . forced = { } ;
49
50
this . setForcedJudg ( props ) ;
50
51
}
@@ -236,7 +237,7 @@ class TweenOne extends Component {
236
237
this . tween . frame ( this . tween . totalTime * repeatNum ) ;
237
238
}
238
239
if ( moment < this . moment && ! this . reverse ||
239
- repeat !== 0 && repeatNum && tweenMoment <= perFrame
240
+ repeat !== 0 && repeatNum && repeatNum !== this . repeatNum
240
241
) {
241
242
// 在 form 状态下,暂停时拉 moment 时,start 有值,,往返方向播放时,在 delay 的时间没有处理。。
242
243
// 与上面的处理一样,删除 start ,重新走一遍 start。。
@@ -273,6 +274,7 @@ class TweenOne extends Component {
273
274
this . props . onChange ( cb ) ;
274
275
} ;
275
276
this . moment = moment ;
277
+ this . repeatNum = repeatNum ;
276
278
this . tween . frame ( tweenMoment ) ;
277
279
}
278
280
You can’t perform that action at this time.
0 commit comments