Skip to content

Commit 5012e10

Browse files
committed
fix update style
1 parent f37cbbe commit 5012e10

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rc-tween-one",
3-
"version": "2.2.4",
3+
"version": "2.2.5",
44
"description": "tween-one anim component for react",
55
"keywords": [
66
"react",

src/TweenOne.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,10 @@ class TweenOne extends Component {
118118
if (!styleEqual) {
119119
// 在动画时更改了 style, 作为更改开始数值。
120120
if (this.tween) {
121-
this.tween.reStart(this.props.style);
121+
this.tween.reStart(nextProps.style);
122+
if (this.paused) {
123+
this.raf();
124+
}
122125
}
123126
}
124127
this.setForcedJudg(nextProps);

0 commit comments

Comments
 (0)