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
36 changes: 18 additions & 18 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion common/config/rush/version-policies.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"definitionName":"lockStepVersion","policyName":"vrenderMain","version":"1.0.39","nextBump":"patch"}]
[{"definitionName":"lockStepVersion","policyName":"vrenderMain","version":"1.0.40","nextBump":"patch"}]
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@visactor/vchart": "1.3.0",
"@visactor/vutils": "~1.0.12",
"@visactor/vgrammar": "~0.5.7",
"@visactor/vrender": "workspace:1.0.39",
"@visactor/vrender": "workspace:1.0.40",
"markdown-it": "^13.0.0",
"highlight.js": "^11.8.0",
"axios": "^1.4.0",
Expand Down
6 changes: 6 additions & 0 deletions packages/react-vrender-utils/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{
"name": "@visactor/react-vrender-utils",
"entries": [
{
"version": "1.0.40",
"tag": "@visactor/react-vrender-utils_v1.0.40",
"date": "Wed, 28 Jan 2026 12:34:44 GMT",
"comments": {}
},
{
"version": "1.0.39",
"tag": "@visactor/react-vrender-utils_v1.0.39",
Expand Down
7 changes: 6 additions & 1 deletion packages/react-vrender-utils/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Change Log - @visactor/react-vrender-utils

This log was last generated on Wed, 21 Jan 2026 11:25:01 GMT and should not be manually modified.
This log was last generated on Wed, 28 Jan 2026 12:34:44 GMT and should not be manually modified.

## 1.0.40
Wed, 28 Jan 2026 12:34:44 GMT

_Version update only_

## 1.0.39
Wed, 21 Jan 2026 11:25:01 GMT
Expand Down
6 changes: 3 additions & 3 deletions packages/react-vrender-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@visactor/react-vrender-utils",
"version": "1.0.39",
"version": "1.0.40",
"description": "",
"sideEffects": false,
"main": "cjs/index.js",
Expand All @@ -24,8 +24,8 @@
"react-dom": "^18.2.0"
},
"dependencies": {
"@visactor/vrender": "workspace:1.0.39",
"@visactor/react-vrender": "workspace:1.0.39",
"@visactor/vrender": "workspace:1.0.40",
"@visactor/react-vrender": "workspace:1.0.40",
"@visactor/vutils": "~1.0.12",
"react-reconciler": "^0.29.0",
"tslib": "^2.3.1"
Expand Down
6 changes: 6 additions & 0 deletions packages/react-vrender/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
{
"name": "@visactor/react-vrender",
"entries": [
{
"version": "1.0.40",
"tag": "@visactor/react-vrender_v1.0.40",
"date": "Wed, 28 Jan 2026 12:34:44 GMT",
"comments": {}
},
{
"version": "1.0.39",
"tag": "@visactor/react-vrender_v1.0.39",
Expand Down
7 changes: 6 additions & 1 deletion packages/react-vrender/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Change Log - @visactor/react-vrender

This log was last generated on Wed, 21 Jan 2026 11:25:01 GMT and should not be manually modified.
This log was last generated on Wed, 28 Jan 2026 12:34:44 GMT and should not be manually modified.

## 1.0.40
Wed, 28 Jan 2026 12:34:44 GMT

_Version update only_

## 1.0.39
Wed, 21 Jan 2026 11:25:01 GMT
Expand Down
4 changes: 2 additions & 2 deletions packages/react-vrender/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@visactor/react-vrender",
"version": "1.0.39",
"version": "1.0.40",
"description": "",
"sideEffects": false,
"main": "cjs/index.js",
Expand All @@ -23,7 +23,7 @@
"react": "^18.2.0"
},
"dependencies": {
"@visactor/vrender": "workspace:1.0.39",
"@visactor/vrender": "workspace:1.0.40",
"@visactor/vutils": "~1.0.12",
"react-reconciler": "^0.29.0",
"tslib": "^2.3.1"
Expand Down
12 changes: 12 additions & 0 deletions packages/vrender-animate/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
{
"name": "@visactor/vrender-animate",
"entries": [
{
"version": "1.0.40",
"tag": "@visactor/vrender-animate_v1.0.40",
"date": "Wed, 28 Jan 2026 12:34:44 GMT",
"comments": {
"none": [
{
"comment": "fix: fix issue of animation channel\n\n"
}
]
}
},
{
"version": "1.0.39",
"tag": "@visactor/vrender-animate_v1.0.39",
Expand Down
11 changes: 10 additions & 1 deletion packages/vrender-animate/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
# Change Log - @visactor/vrender-animate

This log was last generated on Wed, 21 Jan 2026 11:25:01 GMT and should not be manually modified.
This log was last generated on Wed, 28 Jan 2026 12:34:44 GMT and should not be manually modified.

## 1.0.40
Wed, 28 Jan 2026 12:34:44 GMT

### Updates

- fix: fix issue of animation channel



## 1.0.39
Wed, 21 Jan 2026 11:25:01 GMT
Expand Down
4 changes: 2 additions & 2 deletions packages/vrender-animate/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@visactor/vrender-animate",
"version": "1.0.39",
"version": "1.0.40",
"description": "",
"sideEffects": false,
"main": "cjs/index.js",
Expand All @@ -21,7 +21,7 @@
},
"dependencies": {
"@visactor/vutils": "~1.0.12",
"@visactor/vrender-core": "workspace:1.0.39"
"@visactor/vrender-core": "workspace:1.0.40"
},
"devDependencies": {
"@internal/bundler": "workspace:*",
Expand Down
88 changes: 58 additions & 30 deletions packages/vrender-animate/src/executor/animate-executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,9 @@ export class AnimateExecutor implements IAnimateExecutor {
}
from = parsedFromProps.from;
}
if (parsedFromProps.attrOutChannel) {
graphic.setAttributes(parsedFromProps.attrOutChannel);
}

this._handleRunAnimate(
animate,
Expand Down Expand Up @@ -559,6 +562,9 @@ export class AnimateExecutor implements IAnimateExecutor {
}
from = parsedFromProps.from;
}
if (parsedFromProps.attrOutChannel) {
graphic.setAttributes(parsedFromProps.attrOutChannel);
}
const custom = effect.custom ?? AnimateExecutor.builtInAnimateMap[type];
const customType = effect.custom ? (effect as any).customType : getCustomType(custom);
this._handleRunAnimate(
Expand Down Expand Up @@ -645,51 +651,73 @@ export class AnimateExecutor implements IAnimateExecutor {
private createPropsFromChannel(
channel: IAnimationChannelAttrs | IAnimationChannelAttributes | undefined,
graphic: IGraphic
): { from: Record<string, any> | null; props: Record<string, any> } {
): {
from: Record<string, any> | null;
props: Record<string, any>;
attrOutChannel: Record<string, any> | null;
} {
const props: Record<string, any> = {};
let from: Record<string, any> | null = null;

if (!channel) {
return {
from,
props
props,
attrOutChannel: null
};
}

if (!Array.isArray(channel)) {
// 如果是对象,解析 from/to 配置
Object.keys(channel).forEach(key => {
const config = channel[key];
if (config.to !== undefined) {
if (typeof config.to === 'function') {
props[key] = config.to((graphic.context as any)?.data?.[0], graphic, {});
} else {
props[key] = config.to;
}
const attrOutChannel: Record<string, any> | null = {};
let hasAttrs = false;
const diffAttrs = graphic.context?.diffAttrs;
if (Array.isArray(channel)) {
channel = channel.reduce((res, key) => {
if (diffAttrs[key] === undefined) {
return res;
}
if (config.from !== undefined) {
if (!from) {
from = {};
}
if (typeof config.from === 'function') {
from[key] = config.from((graphic.context as any)?.data?.[0], graphic, {});
} else {
from[key] = config.from;
}
res[key] = { to: diffAttrs[key] };
return res;
}, {} as Record<string, any>);
}

// 对象,解析 from/to 配置
Object.keys(channel).forEach(key => {
const config = channel[key];
if (config.to !== undefined) {
if (typeof config.to === 'function') {
props[key] = config.to((graphic.context as any)?.data?.[0], graphic, {});
} else {
props[key] = config.to;
}
});
} else {
channel.forEach(key => {
const value = graphic.context?.diffAttrs?.[key];
if (value !== undefined) {
props[key] = value;
}
if (config.from !== undefined) {
if (!from) {
from = {};
}
});
if (typeof config.from === 'function') {
from[key] = config.from((graphic.context as any)?.data?.[0], graphic, {});
} else {
from[key] = config.from;
}
}
});

if (diffAttrs) {
for (const key in diffAttrs) {
const value = (diffAttrs as any)[key];
if (value === undefined) {
continue;
}
if (!props.hasOwnProperty(key)) {
attrOutChannel[key] = value;
hasAttrs = true;
}
}
}

return {
from,
props
props,
attrOutChannel: hasAttrs ? attrOutChannel : null
};
}

Expand Down
Loading
Loading