Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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"
}
10 changes: 8 additions & 2 deletions packages/vrender-animate/src/executor/animate-executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading