Skip to content

Commit

Permalink
在图表数据更新前将前置的动画标志设置为已完成动画 (#2911)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengyunyu committed Jul 26, 2022
1 parent fbf387b commit 9fb344b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/polar/Pie.tsx
Expand Up @@ -305,18 +305,21 @@ export class Pie extends PureComponent<Props, State> {
prevAnimationId: nextProps.animationId,
curSectors: nextProps.sectors,
prevSectors: [],
isAnimationFinished: true,
};
}
if (nextProps.isAnimationActive && nextProps.animationId !== prevState.prevAnimationId) {
return {
prevAnimationId: nextProps.animationId,
curSectors: nextProps.sectors,
prevSectors: prevState.curSectors,
isAnimationFinished: true,
};
}
if (nextProps.sectors !== prevState.curSectors) {
return {
curSectors: nextProps.sectors,
isAnimationFinished: true,
};
}

Expand Down

0 comments on commit 9fb344b

Please sign in to comment.