From c4cf992dddb3d381439d93925cd63eb31f582268 Mon Sep 17 00:00:00 2001 From: "lixuefei.1313" Date: Fri, 31 Oct 2025 16:50:56 +0800 Subject: [PATCH 1/2] fix: fix the issue of custom animation params --- .../vrender-animate/src/executor/animate-executor.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/packages/vrender-animate/src/executor/animate-executor.ts b/packages/vrender-animate/src/executor/animate-executor.ts index 7042fff60..ca0e92140 100644 --- a/packages/vrender-animate/src/executor/animate-executor.ts +++ b/packages/vrender-animate/src/executor/animate-executor.ts @@ -424,12 +424,18 @@ export class AnimateExecutor implements IAnimateExecutor { ) { // 处理自定义动画 if (custom && customType) { - const customParams = { + const _customParameters = this.resolveValue(customParameters, graphic); + let customParams = _customParameters; + if (typeof customParams !== 'function') { + customParams = customParams(graphic.context?.data?.[0], graphic, {}); + } + customParams = { width: graphic.stage?.width || 0, height: graphic.stage?.height || 0, group: this._target.parent, - ...this.resolveValue(customParameters, graphic) + ..._customParameters }; + const objOptions = isFunction(options) ? options.call( null, From 6b4be8bbb7094f13fabf25c47b700a3e0701ed6d Mon Sep 17 00:00:00 2001 From: "lixuefei.1313" Date: Fri, 31 Oct 2025 16:53:26 +0800 Subject: [PATCH 2/2] docs: update changlog of rush --- ...g-of-animation-custom-params_2025-10-31-08-53.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 common/changes/@visactor/vrender-animate/fix-fix-bug-of-animation-custom-params_2025-10-31-08-53.json diff --git a/common/changes/@visactor/vrender-animate/fix-fix-bug-of-animation-custom-params_2025-10-31-08-53.json b/common/changes/@visactor/vrender-animate/fix-fix-bug-of-animation-custom-params_2025-10-31-08-53.json new file mode 100644 index 000000000..e827390ae --- /dev/null +++ b/common/changes/@visactor/vrender-animate/fix-fix-bug-of-animation-custom-params_2025-10-31-08-53.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "comment": "fix: fix the issue of custom animation params\n\n", + "type": "none", + "packageName": "@visactor/vrender-animate" + } + ], + "packageName": "@visactor/vrender-animate", + "email": "lixuef1313@163.com" +} \ No newline at end of file