Skip to content

Commit

Permalink
use setImmediate to repeat animations
Browse files Browse the repository at this point in the history
  • Loading branch information
xinthink committed Oct 5, 2015
1 parent 0997273 commit 40ae005
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/mdl/Progress.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ class IndeterminateProgress extends Component {
}),
this._getBlock2Ani(),
]),
]).start(() => setImmediate(this._aniUpdateProgress));
]).start(({finished}) => finished && setImmediate(this._aniUpdateProgress));
}

_getBlock2Ani() {
Expand Down
2 changes: 1 addition & 1 deletion lib/mdl/Spinner.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class Spinner extends Component {
duration,
toValue: 1,
}),
]).start(() => setImmediate(this._aniUpdateSpinner));
]).start(({finished}) => finished && setImmediate(this._aniUpdateSpinner));
});
}

Expand Down

0 comments on commit 40ae005

Please sign in to comment.