File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " rc-tween-one" ,
3
- "version" : " 2.2.6 " ,
3
+ "version" : " 2.2.7 " ,
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 @@ -310,7 +310,8 @@ p.render = function () {
310
310
! ( progressTime > duration && item . mode === 'onComplete' ) &&
311
311
this . start [ i ] ) {
312
312
const updateAnim = this . updateAnim === 'update' ;
313
- progressTime = ( progressTime < this . perFrame - this . accuracy ) && ! reverse ? 0 : progressTime ;
313
+ progressTime = ( progressTime < this . perFrame - this . accuracy ) && ! reverse
314
+ && item . duration >= this . perFrame ? 0 : progressTime ;
314
315
if ( ( ( progressTime >= duration - this . accuracy && ! reverse ) || ( reverse && progressTime <= 0 ) )
315
316
&& repeatNum >= item . repeat ) {
316
317
// onReveresComplete 和 onComplete 统一用 onComplete;
Original file line number Diff line number Diff line change @@ -228,7 +228,8 @@ class TweenOne extends Component {
228
228
let repeatNum = Math . floor ( moment / this . tween . totalTime ) || 0 ;
229
229
repeatNum = repeatNum > repeat ? repeat : repeatNum ;
230
230
let tweenMoment = moment - this . tween . totalTime * repeatNum ;
231
- tweenMoment = tweenMoment < perFrame && ! this . reverse ? 0 : tweenMoment ;
231
+ tweenMoment = tweenMoment < perFrame && ! this . reverse &&
232
+ totalTime >= perFrame ? 0 : tweenMoment ;
232
233
if ( repeat && moment && moment - this . tween . totalTime * repeatNum < perFrame ) {
233
234
// 在重置样式之前补 complete;
234
235
this . tween . frame ( this . tween . totalTime * repeatNum ) ;
You can’t perform that action at this time.
0 commit comments