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
34 changes: 17 additions & 17 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.5","nextBump":"patch"}]
[{"definitionName":"lockStepVersion","policyName":"vrenderMain","version":"1.0.6","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.6",
"@visactor/vgrammar": "~0.5.7",
"@visactor/vrender": "workspace:1.0.5",
"@visactor/vrender": "workspace:1.0.6",
"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.6",
"tag": "@visactor/react-vrender-utils_v1.0.6",
"date": "Mon, 23 Jun 2025 12:24:15 GMT",
"comments": {}
},
{
"version": "1.0.5",
"tag": "@visactor/react-vrender-utils_v1.0.5",
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, 18 Jun 2025 10:09:34 GMT and should not be manually modified.
This log was last generated on Mon, 23 Jun 2025 12:24:15 GMT and should not be manually modified.

## 1.0.6
Mon, 23 Jun 2025 12:24:15 GMT

_Version update only_

## 1.0.5
Wed, 18 Jun 2025 10:09:34 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.5",
"version": "1.0.6",
"description": "",
"sideEffects": false,
"main": "cjs/index.js",
Expand All @@ -24,8 +24,8 @@
"react-dom": "^18.2.0"
},
"dependencies": {
"@visactor/vrender": "workspace:1.0.5",
"@visactor/react-vrender": "workspace:1.0.5",
"@visactor/vrender": "workspace:1.0.6",
"@visactor/react-vrender": "workspace:1.0.6",
"@visactor/vutils": "1.0.6",
"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.6",
"tag": "@visactor/react-vrender_v1.0.6",
"date": "Mon, 23 Jun 2025 12:24:15 GMT",
"comments": {}
},
{
"version": "1.0.5",
"tag": "@visactor/react-vrender_v1.0.5",
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, 18 Jun 2025 10:09:34 GMT and should not be manually modified.
This log was last generated on Mon, 23 Jun 2025 12:24:15 GMT and should not be manually modified.

## 1.0.6
Mon, 23 Jun 2025 12:24:15 GMT

_Version update only_

## 1.0.5
Wed, 18 Jun 2025 10:09:34 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.5",
"version": "1.0.6",
"description": "",
"sideEffects": false,
"main": "cjs/index.js",
Expand All @@ -23,7 +23,7 @@
"react": "^18.2.0"
},
"dependencies": {
"@visactor/vrender": "workspace:1.0.5",
"@visactor/vrender": "workspace:1.0.6",
"@visactor/vutils": "1.0.6",
"react-reconciler": "^0.29.0",
"tslib": "^2.3.1"
Expand Down
21 changes: 21 additions & 0 deletions packages/vrender-animate/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@
{
"name": "@visactor/vrender-animate",
"entries": [
{
"version": "1.0.6",
"tag": "@visactor/vrender-animate_v1.0.6",
"date": "Mon, 23 Jun 2025 12:24:15 GMT",
"comments": {
"none": [
{
"comment": "feat: support pauseAnimation resumeAnimation stopAnimation reApplyAnimationState"
},
{
"comment": "fix: fix issue with immediatelyApply in custom animate"
},
{
"comment": "fix: disable increaseEffect in label did not take effect"
},
{
"comment": "fix: fix moveIn animation\n\n"
}
]
}
},
{
"version": "1.0.5",
"tag": "@visactor/vrender-animate_v1.0.5",
Expand Down
14 changes: 13 additions & 1 deletion packages/vrender-animate/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
# Change Log - @visactor/vrender-animate

This log was last generated on Wed, 18 Jun 2025 10:09:34 GMT and should not be manually modified.
This log was last generated on Mon, 23 Jun 2025 12:24:15 GMT and should not be manually modified.

## 1.0.6
Mon, 23 Jun 2025 12:24:15 GMT

### Updates

- feat: support pauseAnimation resumeAnimation stopAnimation reApplyAnimationState
- fix: fix issue with immediatelyApply in custom animate
- fix: disable increaseEffect in label did not take effect
- fix: fix moveIn animation



## 1.0.5
Wed, 18 Jun 2025 10:09:34 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.5",
"version": "1.0.6",
"description": "",
"sideEffects": false,
"main": "cjs/index.js",
Expand All @@ -21,7 +21,7 @@
},
"dependencies": {
"@visactor/vutils": "1.0.6",
"@visactor/vrender-core": "workspace:1.0.5"
"@visactor/vrender-core": "workspace:1.0.6"
},
"devDependencies": {
"@internal/bundler": "workspace:*",
Expand Down
27 changes: 27 additions & 0 deletions packages/vrender-animate/src/animate-extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,31 @@ export class AnimateExtension {
}
return (this as any).attribute[key];
}

pauseAnimation(deep: boolean = false) {
this.animates && this.animates.forEach(animate => animate.pause());
if (deep && (this as any).isContainer) {
(this as any).forEachChildren((child: any) => {
child.pauseAnimation(deep);
});
}
}

resumeAnimation(deep: boolean = false) {
this.animates && this.animates.forEach(animate => animate.resume());
if (deep && (this as any).isContainer) {
(this as any).forEachChildren((child: any) => {
child.resumeAnimation(deep);
});
}
}

stopAnimation(deep: boolean = false) {
this.animates && this.animates.forEach(animate => animate.stop());
if (deep && (this as any).isContainer) {
(this as any).forEachChildren((child: any) => {
child.stopAnimation(deep);
});
}
}
}
4 changes: 3 additions & 1 deletion packages/vrender-animate/src/custom/growCenter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,9 @@ export class GrowCenterIn extends ACustomAnimate<Record<string, number>> {
this.target.setAttributes(finalAttribute);
}

this.target.setAttributes(fromAttrs);
if (this.params.controlOptions?.immediatelyApply !== false) {
this.target.setAttributes(fromAttrs);
}
}

onEnd(cb?: (animate: IAnimate, step: IStep) => void): void {
Expand Down
4 changes: 3 additions & 1 deletion packages/vrender-animate/src/custom/growHeight.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ export class GrowHeightIn extends ACustomAnimate<Record<string, number>> {
this.target.setAttributes(finalAttribute);
}

this.target.setAttributes(fromAttrs);
if (this.params.controlOptions?.immediatelyApply !== false) {
this.target.setAttributes(fromAttrs);
}
}

onEnd(cb?: (animate: IAnimate, step: IStep) => void): void {
Expand Down
19 changes: 9 additions & 10 deletions packages/vrender-animate/src/custom/move.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,15 @@ export const moveIn = (
const point = isFunction(pointOpt)
? pointOpt.call(null, graphic.context?.data?.[0], graphic, animationParameters)
: pointOpt;
const fromX = point && isValidNumber(point.x) ? point.x : changedX;
const fromY = point && isValidNumber(point.y) ? point.y : changedY;
const finalAttrs = graphic.getFinalAttribute();
const finalAttrsX = excludeChannels.includes('x') ? graphic.attribute.x : finalAttrs.x;
const finalAttrsY = excludeChannels.includes('y') ? graphic.attribute.y : finalAttrs.y;
const finalAttrsX = graphic.getGraphicAttribute('x');
const finalAttrsY = graphic.getGraphicAttribute('y');
const fromX = excludeChannels.includes('x') ? finalAttrsX : point && isValidNumber(point.x) ? point.x : changedX;
const fromY = excludeChannels.includes('y') ? finalAttrsY : point && isValidNumber(point.y) ? point.y : changedY;

switch (direction) {
case 'x':
return {
from: { x: fromX },
from: { x: excludeChannels.includes('x') ? finalAttrsX : fromX },
to: { x: finalAttrsX }
};
case 'y':
Expand Down Expand Up @@ -94,20 +93,20 @@ export const moveOut = (
switch (direction) {
case 'x':
return {
from: { x: graphic.attribute.x },
from: { x: graphic.getGraphicAttribute('x') },
to: { x: fromX }
};
case 'y':
return {
from: { y: graphic.attribute.y },
from: { y: graphic.getGraphicAttribute('y') },
to: { y: fromY }
};
case 'xy':
default:
return {
from: {
x: graphic.attribute.x,
y: graphic.attribute.y
x: graphic.getGraphicAttribute('x'),
y: graphic.getGraphicAttribute('y')
},
to: { x: fromX, y: fromY }
};
Expand Down
8 changes: 8 additions & 0 deletions packages/vrender-animate/src/state/animation-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,14 @@ export class AnimationStateManager {
this.stateList = null;
}

reApplyState(state: string): void {
const stateInfo = this.stateList?.find(stateInfo => stateInfo.state === state);
if (stateInfo) {
stateInfo.executor.stop();
stateInfo.executor.execute(stateInfo.animationConfig);
}
}

// getstateList(): string[] | null {
// return this.stateList;
// }
Expand Down
Loading
Loading