diff --git a/common/changes/@visactor/vrender-core/fix-play-attribute_2024-07-03-12-42.json b/common/changes/@visactor/vrender-core/fix-play-attribute_2024-07-03-12-42.json new file mode 100644 index 000000000..a75f87050 --- /dev/null +++ b/common/changes/@visactor/vrender-core/fix-play-attribute_2024-07-03-12-42.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@visactor/vrender-core", + "comment": "fix: fix issue with setAttribute while play with startAt", + "type": "none" + } + ], + "packageName": "@visactor/vrender-core" +} \ No newline at end of file diff --git a/packages/vrender-core/src/animate/animate.ts b/packages/vrender-core/src/animate/animate.ts index 452b0787c..73b6d5002 100644 --- a/packages/vrender-core/src/animate/animate.ts +++ b/packages/vrender-core/src/animate/animate.ts @@ -253,7 +253,7 @@ export class Animate implements IAnimate { const stage = (this.target as IGraphic).stage; stage && stage.renderNextFrame(); } - if (this.subAnimates.length === 1 && this.tailAnimate.duration === customAnimate.duration) { + if (this.subAnimates.length === 1 && this.tailAnimate.totalDuration === customAnimate.duration) { this.trySetAttribute(customAnimate.getFromProps(), customAnimate.mode); } return this;