From cb98cd9be4c6e46598d9087cedc8b1f255ddf96c Mon Sep 17 00:00:00 2001 From: zhouxinyu Date: Mon, 30 Dec 2024 17:40:41 +0800 Subject: [PATCH] fix: fix issue with animate error when graphic.stage is null --- .../fix-animate-with-noStage_2024-12-30-09-41.json | 10 ++++++++++ packages/vrender-core/src/animate/animate.ts | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 common/changes/@visactor/vrender-core/fix-animate-with-noStage_2024-12-30-09-41.json diff --git a/common/changes/@visactor/vrender-core/fix-animate-with-noStage_2024-12-30-09-41.json b/common/changes/@visactor/vrender-core/fix-animate-with-noStage_2024-12-30-09-41.json new file mode 100644 index 000000000..1e808ce1b --- /dev/null +++ b/common/changes/@visactor/vrender-core/fix-animate-with-noStage_2024-12-30-09-41.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@visactor/vrender-core", + "comment": "fix: fix issue with animate error when graphic.stage is null", + "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 84d42484c..7edd14f34 100644 --- a/packages/vrender-core/src/animate/animate.ts +++ b/packages/vrender-core/src/animate/animate.ts @@ -200,7 +200,7 @@ export class Animate implements IAnimate { slience?: boolean ) { this.id = id; - this.timeline = timeline; + this.timeline = timeline || defaultTimeline; this.status = AnimateStatus.INITIAL; this.tailAnimate = new SubAnimate(this); this.subAnimates = [this.tailAnimate];