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.3","nextBump":"patch"}]
[{"definitionName":"lockStepVersion","policyName":"vrenderMain","version":"1.0.4","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.3",
"@visactor/vrender": "workspace:1.0.4",
"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.4",
"tag": "@visactor/react-vrender-utils_v1.0.4",
"date": "Wed, 18 Jun 2025 05:41:49 GMT",
"comments": {}
},
{
"version": "1.0.3",
"tag": "@visactor/react-vrender-utils_v1.0.3",
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 Tue, 10 Jun 2025 09:32:32 GMT and should not be manually modified.
This log was last generated on Wed, 18 Jun 2025 05:41:49 GMT and should not be manually modified.

## 1.0.4
Wed, 18 Jun 2025 05:41:49 GMT

_Version update only_

## 1.0.3
Tue, 10 Jun 2025 09:32:32 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.3",
"version": "1.0.4",
"description": "",
"sideEffects": false,
"main": "cjs/index.js",
Expand All @@ -24,8 +24,8 @@
"react-dom": "^18.2.0"
},
"dependencies": {
"@visactor/vrender": "workspace:1.0.3",
"@visactor/react-vrender": "workspace:1.0.3",
"@visactor/vrender": "workspace:1.0.4",
"@visactor/react-vrender": "workspace:1.0.4",
"@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.4",
"tag": "@visactor/react-vrender_v1.0.4",
"date": "Wed, 18 Jun 2025 05:41:49 GMT",
"comments": {}
},
{
"version": "1.0.3",
"tag": "@visactor/react-vrender_v1.0.3",
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 Tue, 10 Jun 2025 09:32:32 GMT and should not be manually modified.
This log was last generated on Wed, 18 Jun 2025 05:41:49 GMT and should not be manually modified.

## 1.0.4
Wed, 18 Jun 2025 05:41:49 GMT

_Version update only_

## 1.0.3
Tue, 10 Jun 2025 09:32:32 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.3",
"version": "1.0.4",
"description": "",
"sideEffects": false,
"main": "cjs/index.js",
Expand All @@ -23,7 +23,7 @@
"react": "^18.2.0"
},
"dependencies": {
"@visactor/vrender": "workspace:1.0.3",
"@visactor/vrender": "workspace:1.0.4",
"@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.4",
"tag": "@visactor/vrender-animate_v1.0.4",
"date": "Wed, 18 Jun 2025 05:41:49 GMT",
"comments": {
"none": [
{
"comment": "feat: timeline support animationStart flag"
},
{
"comment": "feat: don't prevent normal animate attribute"
},
{
"comment": "fix: fix default params of animation\n\n"
},
{
"comment": "fix: fix issue with recall setupTickHandler"
}
]
}
},
{
"version": "1.0.3",
"tag": "@visactor/vrender-animate_v1.0.3",
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 Tue, 10 Jun 2025 09:32:32 GMT and should not be manually modified.
This log was last generated on Wed, 18 Jun 2025 05:41:49 GMT and should not be manually modified.

## 1.0.4
Wed, 18 Jun 2025 05:41:49 GMT

### Updates

- feat: timeline support animationStart flag
- feat: don't prevent normal animate attribute
- fix: fix default params of animation


- fix: fix issue with recall setupTickHandler

## 1.0.3
Tue, 10 Jun 2025 09:32:32 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.3",
"version": "1.0.4",
"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.3"
"@visactor/vrender-core": "workspace:1.0.4"
},
"devDependencies": {
"@internal/bundler": "workspace:*",
Expand Down
8 changes: 0 additions & 8 deletions packages/vrender-animate/src/animate-extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ export class AnimateExtension {
}

animate(params?: IGraphicAnimateParams) {
if (!this.animates) {
this.animates = new Map();
}
const animate = new Animate(
params?.id,
params?.timeline ?? ((this as any).stage && (this as any).stage.getTimeline()) ?? defaultTimeline,
Expand All @@ -43,11 +40,6 @@ export class AnimateExtension {
onEnd != null && animate.onEnd(onEnd);
onRemove != null && animate.onRemove(onRemove);
}
this.animates.set(animate.id, animate);
animate.onRemove(() => {
animate.stop();
this.animates.delete(animate.id);
});

// TODO 考虑性能问题
(this as any).stage?.ticker.start();
Expand Down
9 changes: 9 additions & 0 deletions packages/vrender-animate/src/animate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,15 @@ export class Animate implements IAnimate {
bind(target: IGraphic): this {
this.target = target;

if (!this.target.animates) {
this.target.animates = new Map();
}
this.target.animates.set(this.id, this);
this.onRemove(() => {
this.stop();
this.target.animates.delete(this.id);
});

if (this.target.onAnimateBind && !this.slience) {
this.target.onAnimateBind(this as any);
}
Expand Down
2 changes: 2 additions & 0 deletions packages/vrender-animate/src/custom/custom-animate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ export abstract class ACustomAnimate<T> extends Step implements ICustomAnimate {
super('customAnimate', customTo, duration, easing);
this.customFrom = customFrom;
this.params = params;
this.from = customFrom;
this.to = customTo;
}

update(end: boolean, ratio: number, out: Record<string, any>): void {
Expand Down
5 changes: 5 additions & 0 deletions packages/vrender-animate/src/custom/fromTo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ export class FromTo extends ACustomAnimate<Record<string, number>> {
this.target.setAttributes(this.from);
}

deleteSelfAttr(key: string): void {
super.deleteSelfAttr(key);
delete this.from[key];
}

/**
* 更新执行的时候调用
* 如果跳帧了就不一定会执行
Expand Down
7 changes: 3 additions & 4 deletions packages/vrender-animate/src/custom/move.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,9 @@ export const moveOut = (
) => {
const { offset = 0, orient, direction, point: pointOpt } = options ?? {};

// consider the offset of group
// const groupBounds = graphic.parent ? graphic.parent.getBounds() : null;
const groupWidth = options.layoutRect?.width ?? graphic.stage.viewWidth;
const groupHeight = options.layoutRect?.height ?? graphic.stage.viewHeight;
const groupBounds = animationParameters.group ? animationParameters.group.AABBBounds : null;
const groupWidth = groupBounds.width() ?? animationParameters.width;
const groupHeight = groupBounds.height() ?? animationParameters.height;
const changedX = (orient === 'negative' ? groupWidth : 0) + offset;
const changedY = (orient === 'negative' ? groupHeight : 0) + offset;
const point = isFunction(pointOpt)
Expand Down
8 changes: 5 additions & 3 deletions packages/vrender-animate/src/executor/animate-executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -420,10 +420,12 @@ export class AnimateExecutor implements IAnimateExecutor {
) {
// 处理自定义动画
if (custom && customType) {
const customParams = this.resolveValue(customParameters, graphic, {
const customParams = {
width: graphic.stage.width,
height: graphic.stage.height
});
height: graphic.stage.height,
group: this._target.parent,
...this.resolveValue(customParameters, graphic)
};
const objOptions = isFunction(options)
? options.call(
null,
Expand Down
Loading
Loading