From 87d616634e462756cf0164bee600ec4e27189719 Mon Sep 17 00:00:00 2001 From: zhouxinyu Date: Mon, 23 Jun 2025 19:57:53 +0800 Subject: [PATCH] feat: support stopAnimation reRunNormalAnimation pauseAnimation resumeAnimation --- packages/vchart/src/core/vchart.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/vchart/src/core/vchart.ts b/packages/vchart/src/core/vchart.ts index 1ca9615c4d..44f7a28951 100644 --- a/packages/vchart/src/core/vchart.ts +++ b/packages/vchart/src/core/vchart.ts @@ -1905,16 +1905,22 @@ export class VChart implements IVChart { /** 停止正在进行的所有动画 */ stopAnimation() { - // this._compiler?.getVGrammarView()?.animate?.stop(); + this.getStage()?.stopAnimation(true); + } + + reRunNormalAnimation() { + this.getStage()?.reApplyAnimationState('normal', true); } /** 暂停正在进行的所有动画 */ pauseAnimation() { + this.getStage()?.pauseAnimation(true); // this._compiler?.getVGrammarView()?.animate?.pause(); } /** 恢复暂停时正在进行的所有动画 */ resumeAnimation() { + this.getStage()?.resumeAnimation(true); // this._compiler?.getVGrammarView()?.animate?.resume(); }