Skip to content

Commit

Permalink
fix: clear transform when animation finished (#5277)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoiver authored Jul 6, 2023
1 parent 63f337b commit db77f1b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/animation/morphing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,12 @@ function oneToOne(
const animation = pathShape.animate(keyframes, timeEffect);

animation.onfinish = () => {
pathShape.style.transform = 'none';
copyAttributes(pathShape, to);
};

// Remove transform because it already applied in path
// converted by convertToPath.
// @todo Remove this scale(1, 1)
pathShape.style.transform = 'scale(1, 1)';
pathShape.style.transform = 'none';
return animation;
}
Expand Down

0 comments on commit db77f1b

Please sign in to comment.