From c610e856904c08ef44fa9cfef4d66f53a897f9f6 Mon Sep 17 00:00:00 2001 From: neuqzxy Date: Fri, 29 Mar 2024 08:04:06 +0000 Subject: [PATCH 01/20] docs: generate changelog of release v0.18.8 --- docs/assets/changelog/en/changelog.md | 19 +++++++++++++++++++ docs/assets/changelog/zh/changelog.md | 19 +++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/docs/assets/changelog/en/changelog.md b/docs/assets/changelog/en/changelog.md index a696194ad..4f46ae1e7 100644 --- a/docs/assets/changelog/en/changelog.md +++ b/docs/assets/changelog/en/changelog.md @@ -1,3 +1,22 @@ +# v0.18.8 + +2024-03-29 + + +**🆕 New feature** + +- **@visactor/vrender-components**: support `inverse` in slider and size-lengend, color-legend + +**🐛 Bug fix** + +- **@visactor/vrender-kits**: fix issue with pointer tap event point map +- **@visactor/vrender-core**: fix issue with pointer tap event point map +- **@visactor/vrender-core**: fix issue for multi line text with underline, closed [#1100](https://github.com/VisActor/VRender/issues/1100) + + + +[more detail about v0.18.8](https://github.com/VisActor/VRender/releases/tag/v0.18.8) + # v0.18.7 2024-03-25 diff --git a/docs/assets/changelog/zh/changelog.md b/docs/assets/changelog/zh/changelog.md index 58fa8cb32..1955ed5c9 100644 --- a/docs/assets/changelog/zh/changelog.md +++ b/docs/assets/changelog/zh/changelog.md @@ -1,3 +1,22 @@ +# v0.18.8 + +2024-03-29 + + +**🆕 新增功能** + +- **@visactor/vrender-components**: support `inverse` in slider and size-lengend, color-legend + +**🐛 功能修复** + +- **@visactor/vrender-kits**: fix issue with pointer tap event point map +- **@visactor/vrender-core**: fix issue with pointer tap event point map +- **@visactor/vrender-core**: fix issue for multi line text with underline, closed [#1100](https://github.com/VisActor/VRender/issues/1100) + + + +[更多详情请查看 v0.18.8](https://github.com/VisActor/VRender/releases/tag/v0.18.8) + # v0.18.7 2024-03-25 From ee52049ec02a11abd352c90d9c11ac6a21c5aaee Mon Sep 17 00:00:00 2001 From: neuqzxy Date: Fri, 29 Mar 2024 11:10:55 +0000 Subject: [PATCH 02/20] docs: generate changelog of release v0.18.10 --- docs/assets/changelog/en/changelog.md | 14 ++++++++++++++ docs/assets/changelog/zh/changelog.md | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/docs/assets/changelog/en/changelog.md b/docs/assets/changelog/en/changelog.md index 4f46ae1e7..748c786e8 100644 --- a/docs/assets/changelog/en/changelog.md +++ b/docs/assets/changelog/en/changelog.md @@ -1,3 +1,17 @@ +# v0.18.10 + +2024-03-29 + + +**🐛 Bug fix** + +- **@visactor/vrender-components**: when user set `defaultSelected` value to be [], all legend's items should be unselected, fixed https://github.com/VisActor/VChart/issues/2445 +- **@visactor/vrender-components**: fix alignment calculation for line axis axis text, fixed https://github.com/VisActor/VChart/issues/2449 + + + +[more detail about v0.18.10](https://github.com/VisActor/VRender/releases/tag/v0.18.10) + # v0.18.8 2024-03-29 diff --git a/docs/assets/changelog/zh/changelog.md b/docs/assets/changelog/zh/changelog.md index 1955ed5c9..bcabf3a9d 100644 --- a/docs/assets/changelog/zh/changelog.md +++ b/docs/assets/changelog/zh/changelog.md @@ -1,3 +1,17 @@ +# v0.18.10 + +2024-03-29 + + +**🐛 功能修复** + +- **@visactor/vrender-components**: when user set `defaultSelected` value to be [], all legend's items should be unselected, fixed https://github.com/VisActor/VChart/issues/2445 +- **@visactor/vrender-components**: fix alignment calculation for line axis axis text, fixed https://github.com/VisActor/VChart/issues/2449 + + + +[更多详情请查看 v0.18.10](https://github.com/VisActor/VRender/releases/tag/v0.18.10) + # v0.18.8 2024-03-29 From cd5ffd4220f374c334f0760cfbfc8a4605eae025 Mon Sep 17 00:00:00 2001 From: zhouxinyu Date: Fri, 29 Mar 2024 19:57:04 +0800 Subject: [PATCH 03/20] docs: add jsx document --- docs/assets/api/en/common/graphic.md | 4 + docs/assets/api/zh/common/graphic.md | 4 + .../assets/guide/en/asd/Basic_Tutorial/Jsx.md | 104 +++++++++++++++++ docs/assets/guide/menu.json | 7 ++ .../assets/guide/zh/asd/Basic_Tutorial/Jsx.md | 105 ++++++++++++++++++ 5 files changed, 224 insertions(+) create mode 100644 docs/assets/guide/en/asd/Basic_Tutorial/Jsx.md create mode 100644 docs/assets/guide/zh/asd/Basic_Tutorial/Jsx.md diff --git a/docs/assets/api/en/common/graphic.md b/docs/assets/api/en/common/graphic.md index 7d57a8fef..cc11b12dc 100644 --- a/docs/assets/api/en/common/graphic.md +++ b/docs/assets/api/en/common/graphic.md @@ -124,3 +124,7 @@ #${prefix} animate()() 添加动画 + +#${prefix} stateProxy()() + +状态配置函数 diff --git a/docs/assets/api/zh/common/graphic.md b/docs/assets/api/zh/common/graphic.md index 7d57a8fef..cc11b12dc 100644 --- a/docs/assets/api/zh/common/graphic.md +++ b/docs/assets/api/zh/common/graphic.md @@ -124,3 +124,7 @@ #${prefix} animate()() 添加动画 + +#${prefix} stateProxy()() + +状态配置函数 diff --git a/docs/assets/guide/en/asd/Basic_Tutorial/Jsx.md b/docs/assets/guide/en/asd/Basic_Tutorial/Jsx.md new file mode 100644 index 000000000..f21d11d06 --- /dev/null +++ b/docs/assets/guide/en/asd/Basic_Tutorial/Jsx.md @@ -0,0 +1,104 @@ +# JSX Support + +VRender supports creating scene tree using JSX syntax. If you want to use this mode, please follow the steps below to check your environment: + +## Environment Configuration + +If you are using JSX syntax to describe scene tree nodes in a react project, you need to wrap VRender's jsx with a conversion function to convert react's virtual nodes into VRender's scene tree nodes. + +```ts +const group = decodeReactDom( + + + +); +``` + +If your project is not a react project, you need to configure babel's jsx parsing to support jsx syntax: + +```ts +plugins: [ + react({ + babel: { + parserOpts: { + plugins: ['decorators-legacy', 'classProperties'] + }, + plugins: [ + [ + '@babel/plugin-transform-react-jsx', + { + pragma: 'jsx', + pragmaFrag: 'Fragment' + } + ] + ] + } + }) +], +``` + +Then import jsx in the code: + +```ts +import { jsx, VGroup, VRect } from '@visactor/vrender'; + +const group = ( + + + +); +``` + +## API Support + +The graphic elements using jsx syntax all start with V, and accept an attribute property. The parameters of this attribute property refer to the configuration document, supporting name, id, and stateProxy configurations, which will be set to the graphic element in the end. The event naming is different, and the event map is as follows: + +```ts +{ + onPointerDown: 'pointerdown', + onPointerUp: 'pointerup', + onPointerUpOutside: 'pointerupoutside', + onPointerTap: 'pointertap', + onPointerOver: 'pointerover', + onPointerMove: 'pointermove', + onPointerEnter: 'pointerenter', + onPointerLeave: 'pointerleave', + onPointerOut: 'pointerout', + onMouseDown: 'mousedown', + onMouseUp: 'mouseup', + onMouseUpOutside: 'mouseupoutside', + onMouseMove: 'mousemove', + onMouseOver: 'mouseover', + onMouseOut: 'mouseout', + onMouseEnter: 'mouseenter', + onMouseLeave: 'mouseleave', + onPinch: 'pinch', + onPinchStart: 'pinchstart', + onPinchEnd: 'pinchend', + onPan: 'pan', + onPanStart: 'panstart', + onPanEnd: 'panend', + onDrag: 'drag', + onDragStart: 'dragstart', + onDragEnter: 'dragenter', + onDragLeave: 'dragleave', + onDragOver: 'dragover', + onDragEnd: 'dragend', + onRightDown: 'rightdown', + onRightUp: 'rightup', + onRightUpOutside: 'rightupoutside', + onTouchStart: 'touchstart', + onTouchEnd: 'touchend', + onTouchEndOutside: 'touchendoutside', + onTouchMove: 'touchmove', + onTouchCancel: 'touchcancel', + onPress: 'press', + onPressUp: 'pressup', + onPressEnd: 'pressend', + onSwipe: 'swipe', + onDrop: 'drop', + onWeel: 'wheel', + onClick: 'click', + onDblClick: 'dblclick' +} +``` diff --git a/docs/assets/guide/menu.json b/docs/assets/guide/menu.json index c45e29129..b3f3c8504 100644 --- a/docs/assets/guide/menu.json +++ b/docs/assets/guide/menu.json @@ -79,6 +79,13 @@ "zh": "扩展和插件", "en": "Extensions and Plugins" } + }, + { + "path": "Jsx", + "title": { + "zh": "Jsx配置", + "en": "jsx config" + } } ] } diff --git a/docs/assets/guide/zh/asd/Basic_Tutorial/Jsx.md b/docs/assets/guide/zh/asd/Basic_Tutorial/Jsx.md new file mode 100644 index 000000000..182a209e2 --- /dev/null +++ b/docs/assets/guide/zh/asd/Basic_Tutorial/Jsx.md @@ -0,0 +1,105 @@ +# JSX 支持 + +VRender 支持 JSX 形式的创建场景树,如果您需要使用这种模式,请按以下步骤检查环境: + +## 环境配置 + +如果您是在 react 项目中使用 jsx 语法来描述场景树节点,那么您需要给 VRender 的 jsx 外层包裹一个转换函数,以便于将 react 的虚拟节点转换成 VRender 的场景树节点 + +```ts +const group = decodeReactDom( + + + +); +``` + +如果您的项目不是 react 项目,那么需要配置 babel 的 jsx 解析以便于支持 jsx 语法: + +```ts +plugins: [ + react({ + babel: { + parserOpts: { + plugins: ['decorators-legacy', 'classProperties'] + }, + plugins: [ + [ + '@babel/plugin-transform-react-jsx', + { + pragma: 'jsx', + pragmaFrag: 'Fragment' + } + ] + ] + } + }) +], +``` + +然后在代码中 import jsx 即可 + +```ts +import { jsx, VGroup, VRect } from '@visactor/vrender'; + +const group = ( + + + +); +``` + +## API 支持 + +使用 jsx 语法的图元都以`V`开头,接受一个 attribute 属性,这个 attribute 属性的参数具体参考配置文档,支持 name、id、stateProxy 配置,最终都会被设置到图元上 +事件命名有所不同,事件的 Map 如下所示: + +```ts +{ + onPointerDown: 'pointerdown', + onPointerUp: 'pointerup', + onPointerUpOutside: 'pointerupoutside', + onPointerTap: 'pointertap', + onPointerOver: 'pointerover', + onPointerMove: 'pointermove', + onPointerEnter: 'pointerenter', + onPointerLeave: 'pointerleave', + onPointerOut: 'pointerout', + onMouseDown: 'mousedown', + onMouseUp: 'mouseup', + onMouseUpOutside: 'mouseupoutside', + onMouseMove: 'mousemove', + onMouseOver: 'mouseover', + onMouseOut: 'mouseout', + onMouseEnter: 'mouseenter', + onMouseLeave: 'mouseleave', + onPinch: 'pinch', + onPinchStart: 'pinchstart', + onPinchEnd: 'pinchend', + onPan: 'pan', + onPanStart: 'panstart', + onPanEnd: 'panend', + onDrag: 'drag', + onDragStart: 'dragstart', + onDragEnter: 'dragenter', + onDragLeave: 'dragleave', + onDragOver: 'dragover', + onDragEnd: 'dragend', + onRightDown: 'rightdown', + onRightUp: 'rightup', + onRightUpOutside: 'rightupoutside', + onTouchStart: 'touchstart', + onTouchEnd: 'touchend', + onTouchEndOutside: 'touchendoutside', + onTouchMove: 'touchmove', + onTouchCancel: 'touchcancel', + onPress: 'press', + onPressUp: 'pressup', + onPressEnd: 'pressend', + onSwipe: 'swipe', + onDrop: 'drop', + onWeel: 'wheel', + onClick: 'click', + onDblClick: 'dblclick' +} +``` From c2523aea10c2e5c33d3a42906f1ba4c8aab30bb3 Mon Sep 17 00:00:00 2001 From: zhouxinyu Date: Mon, 1 Apr 2024 19:55:41 +0800 Subject: [PATCH 04/20] =?UTF-8?q?feat:=20=E6=94=AF=E6=8C=81background-opac?= =?UTF-8?q?ity=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../feat-background-opacity_2024-04-01-11-56.json | 10 ++++++++++ packages/vrender-core/src/graphic/config.ts | 1 + packages/vrender-core/src/interface/graphic.ts | 1 + .../render/contributions/base-contribution-render.ts | 4 ++++ 4 files changed, 16 insertions(+) create mode 100644 common/changes/@visactor/vrender-core/feat-background-opacity_2024-04-01-11-56.json diff --git a/common/changes/@visactor/vrender-core/feat-background-opacity_2024-04-01-11-56.json b/common/changes/@visactor/vrender-core/feat-background-opacity_2024-04-01-11-56.json new file mode 100644 index 000000000..93070150d --- /dev/null +++ b/common/changes/@visactor/vrender-core/feat-background-opacity_2024-04-01-11-56.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@visactor/vrender-core", + "comment": "feat: 支持background-opacity配置", + "type": "none" + } + ], + "packageName": "@visactor/vrender-core" +} \ No newline at end of file diff --git a/packages/vrender-core/src/graphic/config.ts b/packages/vrender-core/src/graphic/config.ts index c4655d793..e27efa28e 100644 --- a/packages/vrender-core/src/graphic/config.ts +++ b/packages/vrender-core/src/graphic/config.ts @@ -123,6 +123,7 @@ export const DefaultPickStyle: IPickStyle = { export const DefaultStyle: IGraphicStyle = { opacity: 1, background: null, + backgroundOpacity: 1, backgroundCornerRadius: 0, texture: null, textureColor: 'black', diff --git a/packages/vrender-core/src/interface/graphic.ts b/packages/vrender-core/src/interface/graphic.ts index 415d7d3c6..30a0c5425 100644 --- a/packages/vrender-core/src/interface/graphic.ts +++ b/packages/vrender-core/src/interface/graphic.ts @@ -193,6 +193,7 @@ export type IGraphicStyle = ILayout & backgroundMode: 'repeat' | 'repeat-x' | 'repeat-y' | 'no-repeat'; // 填充模式(与具体图元有关) backgroundFit: boolean; // 是否正好填充,只在repeat-x或者repeat-y以及no-repeat的时候生效 backgroundCornerRadius: number | number[]; + backgroundOpacity: number; background: | IBackgroundType | { diff --git a/packages/vrender-core/src/render/contributions/render/contributions/base-contribution-render.ts b/packages/vrender-core/src/render/contributions/render/contributions/base-contribution-render.ts index 0396d04a8..560f7de7d 100644 --- a/packages/vrender-core/src/render/contributions/render/contributions/base-contribution-render.ts +++ b/packages/vrender-core/src/render/contributions/render/contributions/base-contribution-render.ts @@ -38,6 +38,8 @@ export class DefaultBaseBackgroundRenderContribution implements IBaseRenderContr ) { const { background, + backgroundOpacity = graphic.attribute.fillOpacity ?? graphicAttribute.backgroundOpacity, + opacity = graphicAttribute.opacity, backgroundMode = graphicAttribute.backgroundMode, backgroundFit = graphicAttribute.backgroundFit } = graphic.attribute; @@ -62,6 +64,7 @@ export class DefaultBaseBackgroundRenderContribution implements IBaseRenderContr context.clip(); const b = graphic.AABBBounds; context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute); + context.globalAlpha = backgroundOpacity * opacity; this.doDrawImage(context, res.data, b, backgroundMode, backgroundFit); context.restore(); if (!graphic.transMatrix.onlyTranslate()) { @@ -70,6 +73,7 @@ export class DefaultBaseBackgroundRenderContribution implements IBaseRenderContr } else { context.highPerformanceSave(); context.setCommonStyle(graphic, graphic.attribute, x, y, graphicAttribute); + context.globalAlpha = backgroundOpacity * opacity; context.fillStyle = background as string; context.fill(); context.highPerformanceRestore(); From 41019400ffe09744417a8f4e47f8704f527de886 Mon Sep 17 00:00:00 2001 From: Rui-Sun Date: Tue, 2 Apr 2024 10:53:53 +0800 Subject: [PATCH 05/20] fix: change click into pointup in checkbox --- .../fix-checkbox-click_2024-04-02-02-53.json | 10 ++++++++++ packages/vrender-components/src/checkbox/checkbox.ts | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 common/changes/@visactor/vrender-components/fix-checkbox-click_2024-04-02-02-53.json diff --git a/common/changes/@visactor/vrender-components/fix-checkbox-click_2024-04-02-02-53.json b/common/changes/@visactor/vrender-components/fix-checkbox-click_2024-04-02-02-53.json new file mode 100644 index 000000000..19983774b --- /dev/null +++ b/common/changes/@visactor/vrender-components/fix-checkbox-click_2024-04-02-02-53.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@visactor/vrender-components", + "comment": "fix: change click into pointup in checkbox", + "type": "none" + } + ], + "packageName": "@visactor/vrender-components" +} \ No newline at end of file diff --git a/packages/vrender-components/src/checkbox/checkbox.ts b/packages/vrender-components/src/checkbox/checkbox.ts index 5c1ebe58d..13ed9e918 100644 --- a/packages/vrender-components/src/checkbox/checkbox.ts +++ b/packages/vrender-components/src/checkbox/checkbox.ts @@ -69,7 +69,7 @@ export class CheckBox extends AbstractComponent> { return undefined; }; - this.addEventListener('click', this.handleClick); + this.addEventListener('pointerup', this.handlePointerUp); } render() { @@ -174,7 +174,7 @@ export class CheckBox extends AbstractComponent> { }); } - handleClick() { + handlePointerUp() { if (this.attribute.disabled) { return; } else if (this.attribute.checked) { From 8857c5c93c26e42ae91310c0bb3873cd0d3d89ff Mon Sep 17 00:00:00 2001 From: Rui-Sun Date: Tue, 2 Apr 2024 11:52:32 +0800 Subject: [PATCH 06/20] fix: change callback name in checkbox --- packages/vrender-components/src/checkbox/checkbox.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/vrender-components/src/checkbox/checkbox.ts b/packages/vrender-components/src/checkbox/checkbox.ts index 13ed9e918..0748605c0 100644 --- a/packages/vrender-components/src/checkbox/checkbox.ts +++ b/packages/vrender-components/src/checkbox/checkbox.ts @@ -69,7 +69,7 @@ export class CheckBox extends AbstractComponent> { return undefined; }; - this.addEventListener('pointerup', this.handlePointerUp); + this.addEventListener('pointerup', this._handlePointerUp); } render() { @@ -174,7 +174,7 @@ export class CheckBox extends AbstractComponent> { }); } - handlePointerUp() { + private _handlePointerUp = () => { if (this.attribute.disabled) { return; } else if (this.attribute.checked) { @@ -189,5 +189,5 @@ export class CheckBox extends AbstractComponent> { eventType: 'checkbox_state_change', checked: this.attribute.checked }); - } + }; } From 48f8e6fe442a749b48a29bef0e2d79c6928fcd2e Mon Sep 17 00:00:00 2001 From: zhouxinyu Date: Tue, 2 Apr 2024 16:07:19 +0800 Subject: [PATCH 07/20] fix: fix issue with wh changed by flex layout, closed #1088 --- .../fix-flex-layout-wh_2024-04-02-08-06.json | 10 ++++++++++ .../src/plugins/builtin-plugin/flex-layout-plugin.ts | 12 ++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 common/changes/@visactor/vrender-core/fix-flex-layout-wh_2024-04-02-08-06.json diff --git a/common/changes/@visactor/vrender-core/fix-flex-layout-wh_2024-04-02-08-06.json b/common/changes/@visactor/vrender-core/fix-flex-layout-wh_2024-04-02-08-06.json new file mode 100644 index 000000000..2ff8cd075 --- /dev/null +++ b/common/changes/@visactor/vrender-core/fix-flex-layout-wh_2024-04-02-08-06.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@visactor/vrender-core", + "comment": "fix: fix issue with wh changed by flex layout, closed #1088", + "type": "none" + } + ], + "packageName": "@visactor/vrender-core" +} \ No newline at end of file diff --git a/packages/vrender-core/src/plugins/builtin-plugin/flex-layout-plugin.ts b/packages/vrender-core/src/plugins/builtin-plugin/flex-layout-plugin.ts index f0918f060..40c192a82 100644 --- a/packages/vrender-core/src/plugins/builtin-plugin/flex-layout-plugin.ts +++ b/packages/vrender-core/src/plugins/builtin-plugin/flex-layout-plugin.ts @@ -94,8 +94,16 @@ export class FlexLayoutPlugin implements IPlugin { height = childrenHeight; } - p.attribute.width = width; - p.attribute.height = height; + if (p.attribute.width == null) { + p.attribute.width = width; + } else { + width = p.attribute.width; + } + if (p.attribute.height == null) { + p.attribute.height = height; + } else { + height = p.attribute.height; + } // 这里使用p._AABBBounds可能会将非布局造成的bounds更新也会触发重新布局 // TODO: 增加layout前预处理,在非递归布局前将子节点及其全部父节点_AABBBounds更新 From 6dabf14881b86774aeb1a4175077ca59fe62a848 Mon Sep 17 00:00:00 2001 From: zhouxinyu Date: Sun, 7 Apr 2024 20:23:38 +0800 Subject: [PATCH 08/20] fix: fix memory issue with DefaultRenderService --- packages/vrender-core/src/render/render-service.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/vrender-core/src/render/render-service.ts b/packages/vrender-core/src/render/render-service.ts index a533df861..604aab5c7 100644 --- a/packages/vrender-core/src/render/render-service.ts +++ b/packages/vrender-core/src/render/render-service.ts @@ -68,5 +68,7 @@ export class DefaultRenderService implements IRenderService { this.beforeDraw(params); this.draw(params); this.afterDraw(params); + this.drawParams = null; + this.renderTreeRoots = []; } } From 8127f8924852bc47633a3096ba4028b56589633a Mon Sep 17 00:00:00 2001 From: zhouxinyu Date: Sun, 7 Apr 2024 20:25:15 +0800 Subject: [PATCH 09/20] fix: fix memory issue with stage timelines --- packages/vrender-core/src/core/stage.ts | 1 + packages/vrender-core/src/interface/animate.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/vrender-core/src/core/stage.ts b/packages/vrender-core/src/core/stage.ts index b3ef04c65..b8af44fc7 100644 --- a/packages/vrender-core/src/core/stage.ts +++ b/packages/vrender-core/src/core/stage.ts @@ -882,6 +882,7 @@ export class Stage extends Group implements IStage { }); this.interactiveLayer && this.interactiveLayer.release(); this.window.release(); + this.ticker.remTimeline(this.timeline); } setStage(stage?: IStage) { diff --git a/packages/vrender-core/src/interface/animate.ts b/packages/vrender-core/src/interface/animate.ts index b28892cc8..ff01ba159 100644 --- a/packages/vrender-core/src/interface/animate.ts +++ b/packages/vrender-core/src/interface/animate.ts @@ -342,4 +342,5 @@ export interface ITicker { start: (force?: boolean) => boolean; stop: () => void; addTimeline: (timeline: ITimeline) => void; + remTimeline: (timeline: ITimeline) => void; } From 472f52d1bac01684cc0b3747849913cb4f7afeed Mon Sep 17 00:00:00 2001 From: zhouxinyu Date: Sun, 7 Apr 2024 20:26:10 +0800 Subject: [PATCH 10/20] chore: add change file --- .../vrender-core/fix-memory_2024-04-07-12-26.json | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 common/changes/@visactor/vrender-core/fix-memory_2024-04-07-12-26.json diff --git a/common/changes/@visactor/vrender-core/fix-memory_2024-04-07-12-26.json b/common/changes/@visactor/vrender-core/fix-memory_2024-04-07-12-26.json new file mode 100644 index 000000000..7ff0a2363 --- /dev/null +++ b/common/changes/@visactor/vrender-core/fix-memory_2024-04-07-12-26.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@visactor/vrender-core", + "comment": "fix: fix memory issue with stage timeline and DefaultRenderService", + "type": "none" + } + ], + "packageName": "@visactor/vrender-core" +} \ No newline at end of file From b099b99765c5713886bc20f5801cd0bad9f28de8 Mon Sep 17 00:00:00 2001 From: Rui-Sun Date: Mon, 8 Apr 2024 14:55:18 +0800 Subject: [PATCH 11/20] feat: add radio component --- .../__tests__/browser/examples/radio.ts | 120 ++++++++++++++++ .../__tests__/browser/main.ts | 4 + packages/vrender-components/src/index.ts | 1 + .../vrender-components/src/radio/index.ts | 2 + .../vrender-components/src/radio/radio.ts | 135 ++++++++++++++++++ .../vrender-components/src/radio/register.ts | 8 ++ packages/vrender-components/src/radio/type.ts | 41 ++++++ 7 files changed, 311 insertions(+) create mode 100644 packages/vrender-components/__tests__/browser/examples/radio.ts create mode 100644 packages/vrender-components/src/radio/index.ts create mode 100644 packages/vrender-components/src/radio/radio.ts create mode 100644 packages/vrender-components/src/radio/register.ts create mode 100644 packages/vrender-components/src/radio/type.ts diff --git a/packages/vrender-components/__tests__/browser/examples/radio.ts b/packages/vrender-components/__tests__/browser/examples/radio.ts new file mode 100644 index 000000000..41900bb98 --- /dev/null +++ b/packages/vrender-components/__tests__/browser/examples/radio.ts @@ -0,0 +1,120 @@ +import '@visactor/vrender'; +import { IPointLike } from '@visactor/vutils'; +import render from '../../util/render'; +import { Radio } from '../../../src'; +import { createLine } from '@visactor/vrender-core'; + +export function run() { + const radios: Radio[] = []; + radios.push( + new Radio({ + id: 'radio-1', + x: 100, + y: 100, + text: { + text: 'radio-1' + }, + checked: false, + disabled: true + }) + ); + + radios.push( + new Radio({ + id: 'radio-2', + x: 200, + y: 100, + text: { + text: 'radio-2' + }, + checked: false, + disabled: false + }) + ); + + radios.push( + new Radio({ + id: 'radio-3', + x: 300, + y: 100, + text: { + text: 'radio-3' + }, + checked: true, + disabled: false + }) + ); + + radios.push( + new Radio({ + id: 'radio-4', + x: 400, + y: 100, + text: { + text: 'radio-4' + }, + checked: true, + disabled: true + }) + ); + + radios.push( + new Radio({ + id: 'radio-5', + x: 100, + y: 200, + text: { + text: 'radio-5' + }, + disabled: true + }) + ); + + radios.push( + new Radio({ + id: 'radio-6', + x: 200, + y: 200, + text: { + text: 'radio-6' + }, + disabled: false + }) + ); + + radios.push( + new Radio({ + id: 'radio-7', + x: 300, + y: 200, + text: { + text: 'radio-7' + }, + disabled: false + }) + ); + + radios.push( + new Radio({ + id: 'radio-8', + x: 400, + y: 200, + text: { + text: 'radio-8' + }, + disabled: true + }) + ); + + const stage = render(radios, 'main'); + + stage.addEventListener('radio_checked', e => { + console.log('radio_checked', e); + const targetRadio = e.target as Radio; + radios.forEach(radio => { + if (radio !== targetRadio) { + radio.setAttribute('checked', false); + } + }); + }); +} diff --git a/packages/vrender-components/__tests__/browser/main.ts b/packages/vrender-components/__tests__/browser/main.ts index 79388e0ee..bda817acc 100644 --- a/packages/vrender-components/__tests__/browser/main.ts +++ b/packages/vrender-components/__tests__/browser/main.ts @@ -241,6 +241,10 @@ const specs = [ { path: 'checkbox', name: 'checkbox' + }, + { + path: 'radio', + name: 'radio' } ]; diff --git a/packages/vrender-components/src/index.ts b/packages/vrender-components/src/index.ts index eb47c90ea..992ba9374 100644 --- a/packages/vrender-components/src/index.ts +++ b/packages/vrender-components/src/index.ts @@ -25,4 +25,5 @@ export * from './tooltip'; export * from './interface'; export * from './jsx'; export * from './checkbox'; +export * from './radio'; export * from './util'; diff --git a/packages/vrender-components/src/radio/index.ts b/packages/vrender-components/src/radio/index.ts new file mode 100644 index 000000000..37982c98e --- /dev/null +++ b/packages/vrender-components/src/radio/index.ts @@ -0,0 +1,2 @@ +export * from './radio'; +export * from './type'; diff --git a/packages/vrender-components/src/radio/radio.ts b/packages/vrender-components/src/radio/radio.ts new file mode 100644 index 000000000..9f131582c --- /dev/null +++ b/packages/vrender-components/src/radio/radio.ts @@ -0,0 +1,135 @@ +import { merge } from '@visactor/vutils'; +import { AbstractComponent } from '../core/base'; +import type { RadioAttributes } from './type'; +import { Arc, WrapText } from '@visactor/vrender-core'; +import type { ComponentOptions } from '../interface'; +import { loadRadioComponent } from './register'; + +loadRadioComponent(); +export class Radio extends AbstractComponent> { + static defaultAttributes: Partial = { + interactive: true, + disabled: false, + checked: false, + cursor: 'pointer', + disableCursor: 'not-allowed', + spaceBetweenTextAndIcon: 8, + text: { + text: 'text', + fontSize: 14, + fill: '#000', + disableFill: 'rgb(201,205,212)', + textBaseline: 'top', + pickable: false + }, + circle: { + outerRadius: 7, + innerRadius: 3, + startAngle: 0, + endAngle: 2 * Math.PI, + fill: '#fff', + stroke: 'rgb(229,230,235)', + disableFill: 'rgb(242,243,245)', + checkedFill: 'rgb(22, 93, 255)', + checkedStroke: 'rgb(22, 93, 255)', + disableCheckedFill: 'rgb(148, 191, 255)', + disableCheckedStroke: 'rgb(148, 191, 255)', + pickable: false + } + }; + _circle: Arc; + _text: WrapText; + + constructor(attributes: RadioAttributes, options?: ComponentOptions) { + super(options?.skipDefault ? attributes : merge({}, Radio.defaultAttributes, attributes)); + this.renderGroup(); + + this.onBeforeAttributeUpdate = (val: any, attributes: any, key: null | string | string[]) => { + if ('interactive' in val) { + this.setAttribute('pickable', val.interactive); + } + if ('disabled' in val) { + this.setAttribute('cursor', val.disable ? this.attribute.disableCursor : this.attribute.cursor); + } + return undefined; + }; + + this.addEventListener('pointerup', this._handlePointerUp); + } + + render() { + this.removeAllChild(true); + + this.renderCircle(); + this.renderText(); + this.layout(); + } + + renderCircle() { + this._circle = new Arc(merge({}, this.attribute.circle)); + const isChecked = this.attribute.checked; + if (isChecked && this.attribute.disabled) { + this._circle.setAttributes({ + fill: this.attribute.circle.disableCheckedFill, + stroke: this.attribute.circle.disableCheckedStroke + }); + } else if (isChecked) { + this._circle.setAttributes({ + fill: this.attribute.circle.checkedFill, + stroke: this.attribute.circle.checkedStroke + }); + } + this.appendChild(this._circle); + } + + renderText() { + this._text = new WrapText(merge({}, this.attribute.text)); + if (this.attribute.disabled) { + this._text.setAttribute('fill', this.attribute.text.disableFill); + } + this.appendChild(this._text); + } + + renderGroup() { + if (!this.attribute.interactive) { + this.setAttribute('pickable', false); + } + if (this.attribute.disabled) { + this.setAttribute('cursor', this.attribute.disableCursor); + } + } + + layout() { + const circleHeight = this.attribute.circle.outerRadius * 2; + const textHeight = this._text.AABBBounds.height(); + const maxHeight = Math.max(circleHeight, textHeight); + const circleY = maxHeight / 2 - circleHeight / 2 + this.attribute.circle.outerRadius; + const textY = maxHeight / 2 - textHeight / 2; + + const circleWidth = this.attribute.circle.outerRadius * 2; + const circleX = this.attribute.circle.outerRadius; + const textX = circleWidth + this.attribute.spaceBetweenTextAndIcon; + + this._circle.setAttributes({ + x: circleX, + y: circleY + }); + this._text.setAttributes({ + x: textX, + y: textY + }); + } + + private _handlePointerUp = () => { + if (this.attribute.disabled || this.attribute.checked) { + // checked do nothing + return; + } + this.setAttribute('checked', true); + + this._dispatchEvent('radio_checked', { + eventType: 'radio_checked', + target: this + }); + }; +} diff --git a/packages/vrender-components/src/radio/register.ts b/packages/vrender-components/src/radio/register.ts new file mode 100644 index 000000000..8ead5e220 --- /dev/null +++ b/packages/vrender-components/src/radio/register.ts @@ -0,0 +1,8 @@ +import { registerGroup, registerImage, registerRect, registerWrapText } from '@visactor/vrender-kits'; + +export function loadRadioComponent() { + registerGroup(); + registerRect(); + registerWrapText(); + registerImage(); +} diff --git a/packages/vrender-components/src/radio/type.ts b/packages/vrender-components/src/radio/type.ts new file mode 100644 index 000000000..6365c4b9b --- /dev/null +++ b/packages/vrender-components/src/radio/type.ts @@ -0,0 +1,41 @@ +import type { + Cursor, + IArcGraphicAttribute, + IColor, + IGroupGraphicAttribute, + IWrapTextGraphicAttribute +} from '@visactor/vrender-core'; + +export type RadioText = { + disableFill?: IColor; +} & IWrapTextGraphicAttribute; + +export type CircleStyle = { + disableFill?: IColor; + checkedFill?: IColor; + checkedStroke?: IColor; + disableCheckedFill?: IColor; + disableCheckedStroke?: IColor; +} & IArcGraphicAttribute; + +export type RadioAttributes = IGroupGraphicAttribute & { + id?: string; + + interactive?: boolean; + disabled?: boolean; + checked?: boolean; + + /** + * 图例文字 + */ + text?: RadioText; + /** + * 图例选中图标 + */ + circle?: CircleStyle; + /** + * 图例选中图标 + */ + disableCursor?: Cursor; + spaceBetweenTextAndIcon?: number; +}; From b113b41dc8ab369816717b806c845b82638b646f Mon Sep 17 00:00:00 2001 From: "jiangtao.yang" Date: Wed, 10 Apr 2024 15:00:30 +0800 Subject: [PATCH 12/20] fix: player events error --- .../__tests__/unit/player/controller.test.ts | 74 +++++++++++++++++++ .../src/player/controller/controller.ts | 10 +-- 2 files changed, 79 insertions(+), 5 deletions(-) create mode 100644 packages/vrender-components/__tests__/unit/player/controller.test.ts diff --git a/packages/vrender-components/__tests__/unit/player/controller.test.ts b/packages/vrender-components/__tests__/unit/player/controller.test.ts new file mode 100644 index 000000000..24eed11c1 --- /dev/null +++ b/packages/vrender-components/__tests__/unit/player/controller.test.ts @@ -0,0 +1,74 @@ +import type { IGraphic, Stage } from '@visactor/vrender-core'; +import { createCanvas } from '../../util/dom'; +import { createStage } from '../../util/vrender'; +import { initBrowserEnv } from '@visactor/vrender-kits'; +import { Controller } from '../../../src/player/controller'; +import { ControllerEventEnum, ControllerTypeEnum } from '../../../src/player/controller/constant'; +initBrowserEnv(); + +describe('PlayerController', () => { + let stage: Stage; + beforeAll(() => { + createCanvas(document.body, 'main'); + stage = createStage('main'); + }); + + afterAll(() => { + stage.release(); + }); + + it('basic play/pause/forward/backward event ', async () => { + const controller = new Controller({ + [ControllerTypeEnum.Start]: {}, + [ControllerTypeEnum.Pause]: {}, + [ControllerTypeEnum.Backward]: {}, + [ControllerTypeEnum.Forward]: {} + }); + + stage.defaultLayer.add(controller as unknown as IGraphic); + stage.render(); + + // @ts-ignore + const playPromise = new Promise((resolve, reject) => { + // @ts-ignore + controller.addEventListener(ControllerEventEnum.OnPlay, () => { + resolve(true); + }); + // @ts-ignore + controller.play(); + }); + + const pausePromise = new Promise((resolve, reject) => { + // @ts-ignore + controller.addEventListener(ControllerEventEnum.OnPause, () => { + resolve(true); + }); + // @ts-ignore + controller.pause(); + }); + + const forwardPromise = new Promise((resolve, reject) => { + // @ts-ignore + controller.addEventListener(ControllerEventEnum.OnForward, () => { + resolve(true); + }); + // @ts-ignore + controller.forward(); + }); + + const backwardPromise = new Promise((resolve, reject) => { + // @ts-ignore + controller.addEventListener(ControllerEventEnum.OnBackward, () => { + resolve(true); + }); + // @ts-ignore + controller.backward(); + }); + + const res = await Promise.all([playPromise, pausePromise, forwardPromise, backwardPromise]); + expect(res).toEqual([true, true, true, true]); + + // @ts-ignore + controller._dispatchEvent(ControllerEventEnum.OnPlay); + }); +}); diff --git a/packages/vrender-components/src/player/controller/controller.ts b/packages/vrender-components/src/player/controller/controller.ts index eef734bbd..c854fc885 100644 --- a/packages/vrender-components/src/player/controller/controller.ts +++ b/packages/vrender-components/src/player/controller/controller.ts @@ -5,7 +5,7 @@ import type { BaseGraphicAttributes } from '../../core/type'; import type { ControllerAttributes, LayoutType } from './type'; import { iconRight, iconPause, iconPlay, iconLeft, iconUp, iconDown } from './assets'; import { PlayerIcon } from './icon'; -import { ControllerTypeEnum } from './constant'; +import { ControllerEventEnum, ControllerTypeEnum } from './constant'; import type { ComponentOptions } from '../../interface'; export class Controller extends AbstractComponent> { @@ -182,19 +182,19 @@ export class Controller extends AbstractComponent }; play = () => { - this._dispatchEvent('ControllerEventEnum.OnPlay'); + this._dispatchEvent(ControllerEventEnum.OnPlay); }; pause = () => { - this._dispatchEvent('ControllerEventEnum.OnPause'); + this._dispatchEvent(ControllerEventEnum.OnPause); }; forward = () => { - this._dispatchEvent('ControllerEventEnum.OnForward'); + this._dispatchEvent(ControllerEventEnum.OnForward); }; backward = () => { - this._dispatchEvent('ControllerEventEnum.OnBackward'); + this._dispatchEvent(ControllerEventEnum.OnBackward); }; togglePlay = () => { From be74c2b6d670b52acf22cb07ad18b873865e3e97 Mon Sep 17 00:00:00 2001 From: "jiangtao.yang" Date: Wed, 10 Apr 2024 15:09:10 +0800 Subject: [PATCH 13/20] docs: add change log --- ...-player-controler-event-error_2024-04-10-07-08.json | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 common/changes/@visactor/vrender-components/fix-player-controler-event-error_2024-04-10-07-08.json diff --git a/common/changes/@visactor/vrender-components/fix-player-controler-event-error_2024-04-10-07-08.json b/common/changes/@visactor/vrender-components/fix-player-controler-event-error_2024-04-10-07-08.json new file mode 100644 index 000000000..f3c9f5b78 --- /dev/null +++ b/common/changes/@visactor/vrender-components/fix-player-controler-event-error_2024-04-10-07-08.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@visactor/vrender-components", + "comment": "fix: player click event not working", + "type": "none" + } + ], + "packageName": "@visactor/vrender-components" +} \ No newline at end of file From 1ece3c40c9027aa559999a6b3532c233e8e11b6e Mon Sep 17 00:00:00 2001 From: "jiangtao.yang" Date: Wed, 10 Apr 2024 17:23:54 +0800 Subject: [PATCH 14/20] refactor: split dataIndex from common attrs --- .../vrender-components/src/player/continuous-player.ts | 9 ++++++++- .../vrender-components/src/player/discrete-player.ts | 7 ++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/packages/vrender-components/src/player/continuous-player.ts b/packages/vrender-components/src/player/continuous-player.ts index 07271e665..5f4eb66a6 100644 --- a/packages/vrender-components/src/player/continuous-player.ts +++ b/packages/vrender-components/src/player/continuous-player.ts @@ -33,6 +33,7 @@ export class ContinuousPlayer extends BasePlayer imp super(attributes); this._initAttributes(); + this._initDataIndex(); this._initEvents(); } @@ -48,7 +49,6 @@ export class ContinuousPlayer extends BasePlayer imp this._isPlaying = false; this._elapsed = 0; this._interval = this.attribute.interval ?? 1000; - this._dataIndex = this.attribute.dataIndex ?? this._minIndex; // 播放帧数(10条数据, 需要10个播放帧) const frames = this._data.length; @@ -66,6 +66,13 @@ export class ContinuousPlayer extends BasePlayer imp } }; + /** + * 初始化dataIndex + */ + private _initDataIndex = () => { + this._dataIndex = this.attribute.dataIndex ?? this._minIndex; + }; + /** * 初始化事件 */ diff --git a/packages/vrender-components/src/player/discrete-player.ts b/packages/vrender-components/src/player/discrete-player.ts index ebce0705b..331f8b72e 100644 --- a/packages/vrender-components/src/player/discrete-player.ts +++ b/packages/vrender-components/src/player/discrete-player.ts @@ -36,12 +36,12 @@ export class DiscretePlayer extends BasePlayer impleme super(options?.skipDefault ? attributes : merge({}, attributes)); this._initAttributes(); + this._initDataIndex(); this._initEvents(); } setAttributes(params: Partial>, forceUpdateTag?: boolean): void { super.setAttributes(params, forceUpdateTag); - this._initAttributes(); } @@ -53,7 +53,12 @@ export class DiscretePlayer extends BasePlayer impleme this._alternate = this.attribute.alternate ?? false; this._interval = this.attribute.interval ?? 1000; this._direction = this.attribute.direction ?? DirectionEnum.Default; + }; + /** + * 初始化dataIndex + */ + private _initDataIndex = () => { this._dataIndex = isNil(this.attribute.dataIndex) ? this._direction === 'default' ? this._minIndex From f6eb58e3c1fa5b2ac5af5662aaa90f02d94bf9c7 Mon Sep 17 00:00:00 2001 From: "jiangtao.yang" Date: Wed, 10 Apr 2024 17:59:44 +0800 Subject: [PATCH 15/20] refactor: make dataIndex as slider value --- .../vrender-components/src/player/base-player.ts | 13 ++++++++++++- .../src/player/continuous-player.ts | 3 +-- .../src/player/discrete-player.ts | 3 +-- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/packages/vrender-components/src/player/base-player.ts b/packages/vrender-components/src/player/base-player.ts index bd8ec5c30..cd30e75c5 100644 --- a/packages/vrender-components/src/player/base-player.ts +++ b/packages/vrender-components/src/player/base-player.ts @@ -79,6 +79,9 @@ export class BasePlayer extends AbstractComponent> private _size: { width: number; height: number }; private _orient: OrientType; + // dataIndex, 代表slider的value + protected _dataIndex: number = 0; + private _layoutInfo: { // 滚动条位置 slider?: { x: number; y: number; size: number }; @@ -94,6 +97,7 @@ export class BasePlayer extends AbstractComponent> super(options?.skipDefault ? attributes : merge({}, BasePlayer.defaultAttributes, attributes)); // 先初始化属性, 再初始化Slider、Controller, 最后初始化事件. this._initAttributes(); + this._initDataIndex(); this._initLayoutInfo(); this._initController(); this._initSlider(); @@ -127,6 +131,13 @@ export class BasePlayer extends AbstractComponent> this._backward = { ...controller.backward }; } + /** + * 初始化dataIndex + */ + _initDataIndex() { + this._dataIndex = this.attribute.dataIndex ?? 0; + } + private _initLayoutInfo() { // 控制器 const controllers = [this._start, this._backward, this._forward].sort((a, b) => a.order - b.order); @@ -216,7 +227,7 @@ export class BasePlayer extends AbstractComponent> // 重要参数 min: this._minIndex, max: this._maxIndex, - value: this.attribute.dataIndex ?? 0, + value: this._dataIndex, railWidth: this._railStyle.width, railHeight: this._railStyle.height, railStyle: this._railStyle, diff --git a/packages/vrender-components/src/player/continuous-player.ts b/packages/vrender-components/src/player/continuous-player.ts index 5f4eb66a6..d96bae0b1 100644 --- a/packages/vrender-components/src/player/continuous-player.ts +++ b/packages/vrender-components/src/player/continuous-player.ts @@ -17,7 +17,6 @@ loadContinuousPlayerComponent(); export class ContinuousPlayer extends BasePlayer implements IContinuousPlayer { declare attribute: ContinuousPlayerAttributes; - private _dataIndex: number; private _activeIndex: number; protected _alternate: boolean; @@ -69,7 +68,7 @@ export class ContinuousPlayer extends BasePlayer imp /** * 初始化dataIndex */ - private _initDataIndex = () => { + _initDataIndex = () => { this._dataIndex = this.attribute.dataIndex ?? this._minIndex; }; diff --git a/packages/vrender-components/src/player/discrete-player.ts b/packages/vrender-components/src/player/discrete-player.ts index 331f8b72e..ec9856e8a 100644 --- a/packages/vrender-components/src/player/discrete-player.ts +++ b/packages/vrender-components/src/player/discrete-player.ts @@ -20,7 +20,6 @@ loadDiscretePlayerComponent(); export class DiscretePlayer extends BasePlayer implements IDiscretePlayer { declare attribute: DiscretePlayerAttributes; - private _dataIndex: number; private _activeIndex = -1; protected _alternate: boolean; @@ -58,7 +57,7 @@ export class DiscretePlayer extends BasePlayer impleme /** * 初始化dataIndex */ - private _initDataIndex = () => { + _initDataIndex = () => { this._dataIndex = isNil(this.attribute.dataIndex) ? this._direction === 'default' ? this._minIndex From a86eecfe79792c951f28ede8a6eba6a2b6efa98a Mon Sep 17 00:00:00 2001 From: "jiangtao.yang" Date: Wed, 10 Apr 2024 20:01:57 +0800 Subject: [PATCH 16/20] docs: change log --- ...-player-controler-event-error_2024-04-10-12-01.json | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 common/changes/@visactor/vrender-components/fix-player-controler-event-error_2024-04-10-12-01.json diff --git a/common/changes/@visactor/vrender-components/fix-player-controler-event-error_2024-04-10-12-01.json b/common/changes/@visactor/vrender-components/fix-player-controler-event-error_2024-04-10-12-01.json new file mode 100644 index 000000000..5a6803cd8 --- /dev/null +++ b/common/changes/@visactor/vrender-components/fix-player-controler-event-error_2024-04-10-12-01.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@visactor/vrender-components", + "comment": "fix: player slider value error after resize", + "type": "none" + } + ], + "packageName": "@visactor/vrender-components" +} \ No newline at end of file From ca7ec5271a37175ea5bbf57ed708b769a826ef28 Mon Sep 17 00:00:00 2001 From: kkxxkk2019 Date: Tue, 16 Apr 2024 16:24:47 +0800 Subject: [PATCH 17/20] fix: pointerenter and pointerleave do not bubble, fixed #1132 --- .../vrender-core/src/event/event-manager.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/vrender-core/src/event/event-manager.ts b/packages/vrender-core/src/event/event-manager.ts index 874dac534..d888e22e3 100644 --- a/packages/vrender-core/src/event/event-manager.ts +++ b/packages/vrender-core/src/event/event-manager.ts @@ -285,7 +285,7 @@ export class EventManager { leaveEvent.eventPhase = leaveEvent.AT_TARGET; - while (leaveEvent.target && !e.composedPath().includes(leaveEvent.target)) { + if (leaveEvent.target && !e.composedPath().includes(leaveEvent.target)) { leaveEvent.currentTarget = leaveEvent.target; this.notifyTarget(leaveEvent); @@ -293,7 +293,7 @@ export class EventManager { this.notifyTarget(leaveEvent, 'mouseleave'); } - leaveEvent.target = leaveEvent.target.parent as IEventTarget; + // leaveEvent.target = leaveEvent.target.parent as IEventTarget; } this.freeEvent(leaveEvent); @@ -327,8 +327,8 @@ export class EventManager { const enterEvent = this.clonePointerEvent(e, 'pointerenter'); enterEvent.eventPhase = enterEvent.AT_TARGET; - - while (enterEvent.target && enterEvent.target !== outTarget && enterEvent.target !== this.rootTarget.parent) { + // 不冒泡 + if (enterEvent.target && enterEvent.target !== outTarget && enterEvent.target !== this.rootTarget.parent) { enterEvent.currentTarget = enterEvent.target; this.notifyTarget(enterEvent); @@ -336,7 +336,7 @@ export class EventManager { this.notifyTarget(enterEvent, 'mouseenter'); } - enterEvent.target = enterEvent.target.parent as IEventTarget; + // enterEvent.target = enterEvent.target.parent as IEventTarget; } this.freeEvent(enterEvent); @@ -388,7 +388,7 @@ export class EventManager { enterEvent.eventPhase = enterEvent.AT_TARGET; - while (enterEvent.target && enterEvent.target !== this.rootTarget.parent) { + if (enterEvent.target && enterEvent.target !== this.rootTarget.parent) { enterEvent.currentTarget = enterEvent.target; this.notifyTarget(enterEvent); @@ -396,7 +396,7 @@ export class EventManager { this.notifyTarget(enterEvent, 'mouseenter'); } - enterEvent.target = enterEvent.target.parent as IEventTarget; + // enterEvent.target = enterEvent.target.parent as IEventTarget; } trackingData.overTargets = e.composedPath(); @@ -429,7 +429,7 @@ export class EventManager { leaveEvent.eventPhase = leaveEvent.AT_TARGET; - while (leaveEvent.target && leaveEvent.target !== this.rootTarget.parent) { + if (leaveEvent.target && leaveEvent.target !== this.rootTarget.parent) { leaveEvent.currentTarget = leaveEvent.target; this.notifyTarget(leaveEvent); @@ -437,7 +437,7 @@ export class EventManager { this.notifyTarget(leaveEvent, 'mouseleave'); } - leaveEvent.target = leaveEvent.target.parent as IEventTarget; + // leaveEvent.target = leaveEvent.target.parent as IEventTarget; } trackingData.overTargets = []; From b50bc1d1a42b5375f2dfeada74eb334ed701a3df Mon Sep 17 00:00:00 2001 From: kkxxkk2019 Date: Tue, 16 Apr 2024 16:32:50 +0800 Subject: [PATCH 18/20] fix: fix for dragenter triggering error in drag event --- packages/vrender-core/src/event/event-target.ts | 4 ++-- packages/vrender-core/src/interface/event.ts | 7 ------- packages/vrender-kits/src/event/extension/drag.ts | 4 ++-- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/packages/vrender-core/src/event/event-target.ts b/packages/vrender-core/src/event/event-target.ts index 95a4a318c..a0bbf9dcb 100644 --- a/packages/vrender-core/src/event/event-target.ts +++ b/packages/vrender-core/src/event/event-target.ts @@ -30,8 +30,8 @@ import { FederatedEvent, CustomEvent } from './federated-event'; */ export const EventTarget: Omit> = { - pickable: true, - visible: true, + // pickable: true, + // visible: true, // attribute: {}, /** diff --git a/packages/vrender-core/src/interface/event.ts b/packages/vrender-core/src/interface/event.ts index 71ea4f2bc..485c37c57 100644 --- a/packages/vrender-core/src/interface/event.ts +++ b/packages/vrender-core/src/interface/event.ts @@ -167,19 +167,12 @@ export interface IFederatedPointerEvent extends IFederatedMouseEvent { */ export interface IEventTarget extends INode { - /** Whether this event target should fire UI events. */ - pickable: boolean; /** The parent of this event target. */ parent: IEventTarget | null; - /** Whether this event target should be visible. */ - visible: boolean; /** The children of this event target. */ children?: IEventTarget[]; - /** Whether this event target has any children that need UI events. This can be used optimize event propagation. */ - childrenPickable?: boolean; - attribute?: Partial; emit: (eventName: any, data: Dict) => boolean; diff --git a/packages/vrender-kits/src/event/extension/drag.ts b/packages/vrender-kits/src/event/extension/drag.ts index c8c9056a5..9d44787c9 100644 --- a/packages/vrender-kits/src/event/extension/drag.ts +++ b/packages/vrender-kits/src/event/extension/drag.ts @@ -49,11 +49,11 @@ export class DragNDrop implements IEventExtension { if (!isRoot) { // 获取当前坐标系的元素,目前认为所有的元素都是可以 dropable 的 - (target as IEventTarget).pickable = false; + (target as IEventTarget).attribute.pickable = false; // @ts-ignore const clickResult = rootNode?.pick(moveEvent.global.x, moveEvent.global.y); const elemBelow = clickResult.graphic; - (target as IEventTarget).pickable = true; + (target as IEventTarget).attribute.pickable = true; if (currentDroppable !== elemBelow) { if (currentDroppable) { From 4c5fc48648f6f1557e07a66819871ca8a57209c8 Mon Sep 17 00:00:00 2001 From: kkxxkk2019 Date: Tue, 16 Apr 2024 16:33:29 +0800 Subject: [PATCH 19/20] chore: update rush change --- .../vrender-core/fix-issue-1132_2024-04-16-08-32.json | 10 ++++++++++ .../vrender-core/fix-issue-1132_2024-04-16-08-33.json | 10 ++++++++++ .../vrender-kits/fix-issue-1132_2024-04-16-08-33.json | 10 ++++++++++ 3 files changed, 30 insertions(+) create mode 100644 common/changes/@visactor/vrender-core/fix-issue-1132_2024-04-16-08-32.json create mode 100644 common/changes/@visactor/vrender-core/fix-issue-1132_2024-04-16-08-33.json create mode 100644 common/changes/@visactor/vrender-kits/fix-issue-1132_2024-04-16-08-33.json diff --git a/common/changes/@visactor/vrender-core/fix-issue-1132_2024-04-16-08-32.json b/common/changes/@visactor/vrender-core/fix-issue-1132_2024-04-16-08-32.json new file mode 100644 index 000000000..8357f0144 --- /dev/null +++ b/common/changes/@visactor/vrender-core/fix-issue-1132_2024-04-16-08-32.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@visactor/vrender-core", + "comment": "fix: pointerenter and pointerleave do not bubble, fixed #1132", + "type": "none" + } + ], + "packageName": "@visactor/vrender-core" +} \ No newline at end of file diff --git a/common/changes/@visactor/vrender-core/fix-issue-1132_2024-04-16-08-33.json b/common/changes/@visactor/vrender-core/fix-issue-1132_2024-04-16-08-33.json new file mode 100644 index 000000000..8f000e82b --- /dev/null +++ b/common/changes/@visactor/vrender-core/fix-issue-1132_2024-04-16-08-33.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@visactor/vrender-core", + "comment": "fix: fix for dragenter triggering error in drag event", + "type": "none" + } + ], + "packageName": "@visactor/vrender-core" +} \ No newline at end of file diff --git a/common/changes/@visactor/vrender-kits/fix-issue-1132_2024-04-16-08-33.json b/common/changes/@visactor/vrender-kits/fix-issue-1132_2024-04-16-08-33.json new file mode 100644 index 000000000..6c465d571 --- /dev/null +++ b/common/changes/@visactor/vrender-kits/fix-issue-1132_2024-04-16-08-33.json @@ -0,0 +1,10 @@ +{ + "changes": [ + { + "packageName": "@visactor/vrender-kits", + "comment": "fix: fix for dragenter triggering error in drag event", + "type": "none" + } + ], + "packageName": "@visactor/vrender-kits" +} \ No newline at end of file From c6c443f10119c48b7b18567af6c33c146bee57b2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 17 Apr 2024 03:05:35 +0000 Subject: [PATCH 20/20] build: prelease version 0.18.11 --- .../fix-checkbox-click_2024-04-02-02-53.json | 10 ------- ...ontroler-event-error_2024-04-10-07-08.json | 10 ------- ...ontroler-event-error_2024-04-10-12-01.json | 10 ------- ...t-background-opacity_2024-04-01-11-56.json | 10 ------- .../fix-flex-layout-wh_2024-04-02-08-06.json | 10 ------- .../fix-issue-1132_2024-04-16-08-32.json | 10 ------- .../fix-issue-1132_2024-04-16-08-33.json | 10 ------- .../fix-memory_2024-04-07-12-26.json | 10 ------- .../fix-issue-1132_2024-04-16-08-33.json | 10 ------- common/config/rush/pnpm-lock.yaml | 26 +++++++++---------- common/config/rush/version-policies.json | 2 +- docs/package.json | 2 +- packages/react-vrender-utils/CHANGELOG.json | 6 +++++ packages/react-vrender-utils/CHANGELOG.md | 7 ++++- packages/react-vrender-utils/package.json | 6 ++--- packages/react-vrender/CHANGELOG.json | 6 +++++ packages/react-vrender/CHANGELOG.md | 7 ++++- packages/react-vrender/package.json | 4 +-- packages/vrender-components/CHANGELOG.json | 18 +++++++++++++ packages/vrender-components/CHANGELOG.md | 11 +++++++- packages/vrender-components/package.json | 6 ++--- packages/vrender-core/CHANGELOG.json | 24 +++++++++++++++++ packages/vrender-core/CHANGELOG.md | 13 +++++++++- packages/vrender-core/package.json | 2 +- packages/vrender-kits/CHANGELOG.json | 12 +++++++++ packages/vrender-kits/CHANGELOG.md | 9 ++++++- packages/vrender-kits/package.json | 4 +-- packages/vrender/CHANGELOG.json | 6 +++++ packages/vrender/CHANGELOG.md | 7 ++++- packages/vrender/package.json | 6 ++--- tools/bugserver-trigger/package.json | 8 +++--- 31 files changed, 153 insertions(+), 129 deletions(-) delete mode 100644 common/changes/@visactor/vrender-components/fix-checkbox-click_2024-04-02-02-53.json delete mode 100644 common/changes/@visactor/vrender-components/fix-player-controler-event-error_2024-04-10-07-08.json delete mode 100644 common/changes/@visactor/vrender-components/fix-player-controler-event-error_2024-04-10-12-01.json delete mode 100644 common/changes/@visactor/vrender-core/feat-background-opacity_2024-04-01-11-56.json delete mode 100644 common/changes/@visactor/vrender-core/fix-flex-layout-wh_2024-04-02-08-06.json delete mode 100644 common/changes/@visactor/vrender-core/fix-issue-1132_2024-04-16-08-32.json delete mode 100644 common/changes/@visactor/vrender-core/fix-issue-1132_2024-04-16-08-33.json delete mode 100644 common/changes/@visactor/vrender-core/fix-memory_2024-04-07-12-26.json delete mode 100644 common/changes/@visactor/vrender-kits/fix-issue-1132_2024-04-16-08-33.json diff --git a/common/changes/@visactor/vrender-components/fix-checkbox-click_2024-04-02-02-53.json b/common/changes/@visactor/vrender-components/fix-checkbox-click_2024-04-02-02-53.json deleted file mode 100644 index 19983774b..000000000 --- a/common/changes/@visactor/vrender-components/fix-checkbox-click_2024-04-02-02-53.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@visactor/vrender-components", - "comment": "fix: change click into pointup in checkbox", - "type": "none" - } - ], - "packageName": "@visactor/vrender-components" -} \ No newline at end of file diff --git a/common/changes/@visactor/vrender-components/fix-player-controler-event-error_2024-04-10-07-08.json b/common/changes/@visactor/vrender-components/fix-player-controler-event-error_2024-04-10-07-08.json deleted file mode 100644 index f3c9f5b78..000000000 --- a/common/changes/@visactor/vrender-components/fix-player-controler-event-error_2024-04-10-07-08.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@visactor/vrender-components", - "comment": "fix: player click event not working", - "type": "none" - } - ], - "packageName": "@visactor/vrender-components" -} \ No newline at end of file diff --git a/common/changes/@visactor/vrender-components/fix-player-controler-event-error_2024-04-10-12-01.json b/common/changes/@visactor/vrender-components/fix-player-controler-event-error_2024-04-10-12-01.json deleted file mode 100644 index 5a6803cd8..000000000 --- a/common/changes/@visactor/vrender-components/fix-player-controler-event-error_2024-04-10-12-01.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@visactor/vrender-components", - "comment": "fix: player slider value error after resize", - "type": "none" - } - ], - "packageName": "@visactor/vrender-components" -} \ No newline at end of file diff --git a/common/changes/@visactor/vrender-core/feat-background-opacity_2024-04-01-11-56.json b/common/changes/@visactor/vrender-core/feat-background-opacity_2024-04-01-11-56.json deleted file mode 100644 index 93070150d..000000000 --- a/common/changes/@visactor/vrender-core/feat-background-opacity_2024-04-01-11-56.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@visactor/vrender-core", - "comment": "feat: 支持background-opacity配置", - "type": "none" - } - ], - "packageName": "@visactor/vrender-core" -} \ No newline at end of file diff --git a/common/changes/@visactor/vrender-core/fix-flex-layout-wh_2024-04-02-08-06.json b/common/changes/@visactor/vrender-core/fix-flex-layout-wh_2024-04-02-08-06.json deleted file mode 100644 index 2ff8cd075..000000000 --- a/common/changes/@visactor/vrender-core/fix-flex-layout-wh_2024-04-02-08-06.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@visactor/vrender-core", - "comment": "fix: fix issue with wh changed by flex layout, closed #1088", - "type": "none" - } - ], - "packageName": "@visactor/vrender-core" -} \ No newline at end of file diff --git a/common/changes/@visactor/vrender-core/fix-issue-1132_2024-04-16-08-32.json b/common/changes/@visactor/vrender-core/fix-issue-1132_2024-04-16-08-32.json deleted file mode 100644 index 8357f0144..000000000 --- a/common/changes/@visactor/vrender-core/fix-issue-1132_2024-04-16-08-32.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@visactor/vrender-core", - "comment": "fix: pointerenter and pointerleave do not bubble, fixed #1132", - "type": "none" - } - ], - "packageName": "@visactor/vrender-core" -} \ No newline at end of file diff --git a/common/changes/@visactor/vrender-core/fix-issue-1132_2024-04-16-08-33.json b/common/changes/@visactor/vrender-core/fix-issue-1132_2024-04-16-08-33.json deleted file mode 100644 index 8f000e82b..000000000 --- a/common/changes/@visactor/vrender-core/fix-issue-1132_2024-04-16-08-33.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@visactor/vrender-core", - "comment": "fix: fix for dragenter triggering error in drag event", - "type": "none" - } - ], - "packageName": "@visactor/vrender-core" -} \ No newline at end of file diff --git a/common/changes/@visactor/vrender-core/fix-memory_2024-04-07-12-26.json b/common/changes/@visactor/vrender-core/fix-memory_2024-04-07-12-26.json deleted file mode 100644 index 7ff0a2363..000000000 --- a/common/changes/@visactor/vrender-core/fix-memory_2024-04-07-12-26.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@visactor/vrender-core", - "comment": "fix: fix memory issue with stage timeline and DefaultRenderService", - "type": "none" - } - ], - "packageName": "@visactor/vrender-core" -} \ No newline at end of file diff --git a/common/changes/@visactor/vrender-kits/fix-issue-1132_2024-04-16-08-33.json b/common/changes/@visactor/vrender-kits/fix-issue-1132_2024-04-16-08-33.json deleted file mode 100644 index 6c465d571..000000000 --- a/common/changes/@visactor/vrender-kits/fix-issue-1132_2024-04-16-08-33.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "changes": [ - { - "packageName": "@visactor/vrender-kits", - "comment": "fix: fix for dragenter triggering error in drag event", - "type": "none" - } - ], - "packageName": "@visactor/vrender-kits" -} \ No newline at end of file diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index ad1c103e6..0b3223edf 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -14,7 +14,7 @@ importers: '@types/react-dom': ^18.0.0 '@visactor/vchart': 1.3.0 '@visactor/vgrammar': ~0.5.7 - '@visactor/vrender': workspace:0.18.10 + '@visactor/vrender': workspace:0.18.11 '@visactor/vutils': ~0.18.1 '@vitejs/plugin-react': 3.1.0 axios: ^1.4.0 @@ -71,7 +71,7 @@ importers: '@types/react': ^18.0.0 '@types/react-dom': ^18.0.0 '@types/react-reconciler': ^0.28.2 - '@visactor/vrender': workspace:0.18.10 + '@visactor/vrender': workspace:0.18.11 '@visactor/vutils': ~0.18.1 '@vitejs/plugin-react': 3.1.0 eslint: ~8.18.0 @@ -109,8 +109,8 @@ importers: '@rushstack/eslint-patch': ~1.1.4 '@types/react': ^18.0.0 '@types/react-dom': ^18.0.0 - '@visactor/react-vrender': workspace:0.18.10 - '@visactor/vrender': workspace:0.18.10 + '@visactor/react-vrender': workspace:0.18.11 + '@visactor/vrender': workspace:0.18.11 '@visactor/vutils': ~0.18.1 '@vitejs/plugin-react': 3.1.0 eslint: ~8.18.0 @@ -149,8 +149,8 @@ importers: '@types/jest': ^26.0.0 '@types/react': ^18.0.0 '@types/react-dom': ^18.0.0 - '@visactor/vrender-core': workspace:0.18.10 - '@visactor/vrender-kits': workspace:0.18.10 + '@visactor/vrender-core': workspace:0.18.11 + '@visactor/vrender-kits': workspace:0.18.11 '@visactor/vutils': ~0.18.1 '@vitejs/plugin-react': 3.1.0 canvas: 2.11.2 @@ -194,8 +194,8 @@ importers: '@internal/ts-config': workspace:* '@rushstack/eslint-patch': ~1.1.4 '@types/jest': ^26.0.0 - '@visactor/vrender-core': workspace:0.18.10 - '@visactor/vrender-kits': workspace:0.18.10 + '@visactor/vrender-core': workspace:0.18.11 + '@visactor/vrender-kits': workspace:0.18.11 '@visactor/vscale': ~0.17.3 '@visactor/vutils': ~0.18.1 eslint: ~8.18.0 @@ -277,7 +277,7 @@ importers: '@types/node-fetch': 2.6.4 '@types/react': ^18.0.0 '@types/react-dom': ^18.0.0 - '@visactor/vrender-core': workspace:0.18.10 + '@visactor/vrender-core': workspace:0.18.11 '@visactor/vutils': ~0.18.1 '@vitejs/plugin-react': 3.1.0 canvas: 2.11.2 @@ -357,10 +357,10 @@ importers: '@rushstack/eslint-patch': ~1.1.4 '@types/node': '*' '@types/node-fetch': 2.6.4 - '@visactor/vrender': workspace:0.18.10 - '@visactor/vrender-components': workspace:0.18.10 - '@visactor/vrender-core': workspace:0.18.10 - '@visactor/vrender-kits': workspace:0.18.10 + '@visactor/vrender': workspace:0.18.11 + '@visactor/vrender-components': workspace:0.18.11 + '@visactor/vrender-core': workspace:0.18.11 + '@visactor/vrender-kits': workspace:0.18.11 eslint: ~8.18.0 form-data: ~4.0.0 node-fetch: 2.6.6 diff --git a/common/config/rush/version-policies.json b/common/config/rush/version-policies.json index 087382e55..254ff223c 100644 --- a/common/config/rush/version-policies.json +++ b/common/config/rush/version-policies.json @@ -1 +1 @@ -[{"definitionName":"lockStepVersion","policyName":"vrenderMain","version":"0.18.10","nextBump":"patch"}] +[{"definitionName":"lockStepVersion","policyName":"vrenderMain","version":"0.18.11","nextBump":"patch"}] diff --git a/docs/package.json b/docs/package.json index 748c2b150..15e892934 100644 --- a/docs/package.json +++ b/docs/package.json @@ -13,7 +13,7 @@ "@visactor/vchart": "1.3.0", "@visactor/vutils": "~0.18.1", "@visactor/vgrammar": "~0.5.7", - "@visactor/vrender": "workspace:0.18.10", + "@visactor/vrender": "workspace:0.18.11", "markdown-it": "^13.0.0", "highlight.js": "^11.8.0", "axios": "^1.4.0", diff --git a/packages/react-vrender-utils/CHANGELOG.json b/packages/react-vrender-utils/CHANGELOG.json index a756c600b..8772e0985 100644 --- a/packages/react-vrender-utils/CHANGELOG.json +++ b/packages/react-vrender-utils/CHANGELOG.json @@ -1,6 +1,12 @@ { "name": "@visactor/react-vrender-utils", "entries": [ + { + "version": "0.18.11", + "tag": "@visactor/react-vrender-utils_v0.18.11", + "date": "Wed, 17 Apr 2024 03:02:22 GMT", + "comments": {} + }, { "version": "0.18.10", "tag": "@visactor/react-vrender-utils_v0.18.10", diff --git a/packages/react-vrender-utils/CHANGELOG.md b/packages/react-vrender-utils/CHANGELOG.md index 2586a07c0..5400e510f 100644 --- a/packages/react-vrender-utils/CHANGELOG.md +++ b/packages/react-vrender-utils/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @visactor/react-vrender-utils -This log was last generated on Fri, 29 Mar 2024 08:02:16 GMT and should not be manually modified. +This log was last generated on Wed, 17 Apr 2024 03:02:22 GMT and should not be manually modified. + +## 0.18.11 +Wed, 17 Apr 2024 03:02:22 GMT + +_Version update only_ ## 0.18.10 Fri, 29 Mar 2024 08:02:16 GMT diff --git a/packages/react-vrender-utils/package.json b/packages/react-vrender-utils/package.json index 120a607ea..e76c7e5c3 100644 --- a/packages/react-vrender-utils/package.json +++ b/packages/react-vrender-utils/package.json @@ -1,6 +1,6 @@ { "name": "@visactor/react-vrender-utils", - "version": "0.18.10", + "version": "0.18.11", "description": "", "sideEffects": false, "main": "cjs/index.js", @@ -24,8 +24,8 @@ "react-dom": "^18.2.0" }, "dependencies": { - "@visactor/vrender": "workspace:0.18.10", - "@visactor/react-vrender": "workspace:0.18.10", + "@visactor/vrender": "workspace:0.18.11", + "@visactor/react-vrender": "workspace:0.18.11", "@visactor/vutils": "~0.18.1", "react-reconciler": "^0.29.0", "tslib": "^2.3.1" diff --git a/packages/react-vrender/CHANGELOG.json b/packages/react-vrender/CHANGELOG.json index c6d44da62..95a8ddcf6 100644 --- a/packages/react-vrender/CHANGELOG.json +++ b/packages/react-vrender/CHANGELOG.json @@ -1,6 +1,12 @@ { "name": "@visactor/react-vrender", "entries": [ + { + "version": "0.18.11", + "tag": "@visactor/react-vrender_v0.18.11", + "date": "Wed, 17 Apr 2024 03:02:22 GMT", + "comments": {} + }, { "version": "0.18.10", "tag": "@visactor/react-vrender_v0.18.10", diff --git a/packages/react-vrender/CHANGELOG.md b/packages/react-vrender/CHANGELOG.md index 61a6aca87..1649c3df2 100644 --- a/packages/react-vrender/CHANGELOG.md +++ b/packages/react-vrender/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @visactor/react-vrender -This log was last generated on Fri, 29 Mar 2024 08:02:16 GMT and should not be manually modified. +This log was last generated on Wed, 17 Apr 2024 03:02:22 GMT and should not be manually modified. + +## 0.18.11 +Wed, 17 Apr 2024 03:02:22 GMT + +_Version update only_ ## 0.18.10 Fri, 29 Mar 2024 08:02:16 GMT diff --git a/packages/react-vrender/package.json b/packages/react-vrender/package.json index 99a02dc31..50a51ba0b 100644 --- a/packages/react-vrender/package.json +++ b/packages/react-vrender/package.json @@ -1,6 +1,6 @@ { "name": "@visactor/react-vrender", - "version": "0.18.10", + "version": "0.18.11", "description": "", "sideEffects": false, "main": "cjs/index.js", @@ -23,7 +23,7 @@ "react": "^18.2.0" }, "dependencies": { - "@visactor/vrender": "workspace:0.18.10", + "@visactor/vrender": "workspace:0.18.11", "@visactor/vutils": "~0.18.1", "react-reconciler": "^0.29.0", "tslib": "^2.3.1" diff --git a/packages/vrender-components/CHANGELOG.json b/packages/vrender-components/CHANGELOG.json index f3a1010a0..eb54f12a8 100644 --- a/packages/vrender-components/CHANGELOG.json +++ b/packages/vrender-components/CHANGELOG.json @@ -1,6 +1,24 @@ { "name": "@visactor/vrender-components", "entries": [ + { + "version": "0.18.11", + "tag": "@visactor/vrender-components_v0.18.11", + "date": "Wed, 17 Apr 2024 03:02:22 GMT", + "comments": { + "none": [ + { + "comment": "fix: change click into pointup in checkbox" + }, + { + "comment": "fix: player click event not working" + }, + { + "comment": "fix: player slider value error after resize" + } + ] + } + }, { "version": "0.18.10", "tag": "@visactor/vrender-components_v0.18.10", diff --git a/packages/vrender-components/CHANGELOG.md b/packages/vrender-components/CHANGELOG.md index 57198c9d3..d5306af4a 100644 --- a/packages/vrender-components/CHANGELOG.md +++ b/packages/vrender-components/CHANGELOG.md @@ -1,6 +1,15 @@ # Change Log - @visactor/vrender-components -This log was last generated on Fri, 29 Mar 2024 08:02:16 GMT and should not be manually modified. +This log was last generated on Wed, 17 Apr 2024 03:02:22 GMT and should not be manually modified. + +## 0.18.11 +Wed, 17 Apr 2024 03:02:22 GMT + +### Updates + +- fix: change click into pointup in checkbox +- fix: player click event not working +- fix: player slider value error after resize ## 0.18.10 Fri, 29 Mar 2024 08:02:16 GMT diff --git a/packages/vrender-components/package.json b/packages/vrender-components/package.json index ec13534cf..41e31f892 100644 --- a/packages/vrender-components/package.json +++ b/packages/vrender-components/package.json @@ -1,6 +1,6 @@ { "name": "@visactor/vrender-components", - "version": "0.18.10", + "version": "0.18.11", "description": "components library for dp visualization", "sideEffects": false, "main": "cjs/index.js", @@ -24,8 +24,8 @@ "analysis-core": "bundle -f umd -a -i core.ts" }, "dependencies": { - "@visactor/vrender-core": "workspace:0.18.10", - "@visactor/vrender-kits": "workspace:0.18.10", + "@visactor/vrender-core": "workspace:0.18.11", + "@visactor/vrender-kits": "workspace:0.18.11", "@visactor/vutils": "~0.18.1", "@visactor/vscale": "~0.17.3" }, diff --git a/packages/vrender-core/CHANGELOG.json b/packages/vrender-core/CHANGELOG.json index 689200bf2..159814d10 100644 --- a/packages/vrender-core/CHANGELOG.json +++ b/packages/vrender-core/CHANGELOG.json @@ -1,6 +1,30 @@ { "name": "@visactor/vrender-core", "entries": [ + { + "version": "0.18.11", + "tag": "@visactor/vrender-core_v0.18.11", + "date": "Wed, 17 Apr 2024 03:02:22 GMT", + "comments": { + "none": [ + { + "comment": "feat: 支持background-opacity配置" + }, + { + "comment": "fix: fix issue with wh changed by flex layout, closed #1088" + }, + { + "comment": "fix: pointerenter and pointerleave do not bubble, fixed #1132" + }, + { + "comment": "fix: fix for dragenter triggering error in drag event" + }, + { + "comment": "fix: fix memory issue with stage timeline and DefaultRenderService" + } + ] + } + }, { "version": "0.18.10", "tag": "@visactor/vrender-core_v0.18.10", diff --git a/packages/vrender-core/CHANGELOG.md b/packages/vrender-core/CHANGELOG.md index 69ec67056..c7a492794 100644 --- a/packages/vrender-core/CHANGELOG.md +++ b/packages/vrender-core/CHANGELOG.md @@ -1,6 +1,17 @@ # Change Log - @visactor/vrender-core -This log was last generated on Fri, 29 Mar 2024 08:02:16 GMT and should not be manually modified. +This log was last generated on Wed, 17 Apr 2024 03:02:22 GMT and should not be manually modified. + +## 0.18.11 +Wed, 17 Apr 2024 03:02:22 GMT + +### Updates + +- feat: 支持background-opacity配置 +- fix: fix issue with wh changed by flex layout, closed #1088 +- fix: pointerenter and pointerleave do not bubble, fixed #1132 +- fix: fix for dragenter triggering error in drag event +- fix: fix memory issue with stage timeline and DefaultRenderService ## 0.18.10 Fri, 29 Mar 2024 08:02:16 GMT diff --git a/packages/vrender-core/package.json b/packages/vrender-core/package.json index 0eb4a6375..357b42eba 100644 --- a/packages/vrender-core/package.json +++ b/packages/vrender-core/package.json @@ -1,6 +1,6 @@ { "name": "@visactor/vrender-core", - "version": "0.18.10", + "version": "0.18.11", "description": "", "sideEffects": [ "./src/modules.ts", diff --git a/packages/vrender-kits/CHANGELOG.json b/packages/vrender-kits/CHANGELOG.json index 70ca69cbd..12597e2fa 100644 --- a/packages/vrender-kits/CHANGELOG.json +++ b/packages/vrender-kits/CHANGELOG.json @@ -1,6 +1,18 @@ { "name": "@visactor/vrender-kits", "entries": [ + { + "version": "0.18.11", + "tag": "@visactor/vrender-kits_v0.18.11", + "date": "Wed, 17 Apr 2024 03:02:22 GMT", + "comments": { + "none": [ + { + "comment": "fix: fix for dragenter triggering error in drag event" + } + ] + } + }, { "version": "0.18.10", "tag": "@visactor/vrender-kits_v0.18.10", diff --git a/packages/vrender-kits/CHANGELOG.md b/packages/vrender-kits/CHANGELOG.md index 458f4061e..4d23f2802 100644 --- a/packages/vrender-kits/CHANGELOG.md +++ b/packages/vrender-kits/CHANGELOG.md @@ -1,6 +1,13 @@ # Change Log - @visactor/vrender-kits -This log was last generated on Fri, 29 Mar 2024 08:02:16 GMT and should not be manually modified. +This log was last generated on Wed, 17 Apr 2024 03:02:22 GMT and should not be manually modified. + +## 0.18.11 +Wed, 17 Apr 2024 03:02:22 GMT + +### Updates + +- fix: fix for dragenter triggering error in drag event ## 0.18.10 Fri, 29 Mar 2024 08:02:16 GMT diff --git a/packages/vrender-kits/package.json b/packages/vrender-kits/package.json index c0e99372a..f551c472f 100644 --- a/packages/vrender-kits/package.json +++ b/packages/vrender-kits/package.json @@ -1,6 +1,6 @@ { "name": "@visactor/vrender-kits", - "version": "0.18.10", + "version": "0.18.11", "description": "", "sideEffects": false, "main": "cjs/index.js", @@ -20,7 +20,7 @@ "test": "" }, "dependencies": { - "@visactor/vrender-core": "workspace:0.18.10", + "@visactor/vrender-core": "workspace:0.18.11", "@visactor/vutils": "~0.18.1", "@resvg/resvg-js": "2.4.1", "roughjs": "4.5.2" diff --git a/packages/vrender/CHANGELOG.json b/packages/vrender/CHANGELOG.json index c2745dbc0..1f8231dca 100644 --- a/packages/vrender/CHANGELOG.json +++ b/packages/vrender/CHANGELOG.json @@ -1,6 +1,12 @@ { "name": "@visactor/vrender", "entries": [ + { + "version": "0.18.11", + "tag": "@visactor/vrender_v0.18.11", + "date": "Wed, 17 Apr 2024 03:02:22 GMT", + "comments": {} + }, { "version": "0.18.10", "tag": "@visactor/vrender_v0.18.10", diff --git a/packages/vrender/CHANGELOG.md b/packages/vrender/CHANGELOG.md index 9978d6368..d768b4c17 100644 --- a/packages/vrender/CHANGELOG.md +++ b/packages/vrender/CHANGELOG.md @@ -1,6 +1,11 @@ # Change Log - @visactor/vrender -This log was last generated on Fri, 29 Mar 2024 08:02:16 GMT and should not be manually modified. +This log was last generated on Wed, 17 Apr 2024 03:02:22 GMT and should not be manually modified. + +## 0.18.11 +Wed, 17 Apr 2024 03:02:22 GMT + +_Version update only_ ## 0.18.10 Fri, 29 Mar 2024 08:02:16 GMT diff --git a/packages/vrender/package.json b/packages/vrender/package.json index 38730b239..3236e44d0 100644 --- a/packages/vrender/package.json +++ b/packages/vrender/package.json @@ -1,6 +1,6 @@ { "name": "@visactor/vrender", - "version": "0.18.10", + "version": "0.18.11", "description": "", "sideEffects": true, "main": "cjs/index.js", @@ -24,8 +24,8 @@ "test-watch": "DEBUG_MODE=1 jest --watch" }, "dependencies": { - "@visactor/vrender-core": "workspace:0.18.10", - "@visactor/vrender-kits": "workspace:0.18.10" + "@visactor/vrender-core": "workspace:0.18.11", + "@visactor/vrender-kits": "workspace:0.18.11" }, "devDependencies": { "@internal/bundler": "workspace:*", diff --git a/tools/bugserver-trigger/package.json b/tools/bugserver-trigger/package.json index 18095bb3f..051f4b464 100644 --- a/tools/bugserver-trigger/package.json +++ b/tools/bugserver-trigger/package.json @@ -8,10 +8,10 @@ "ci": "ts-node --transpileOnly --skipProject ./scripts/trigger-test.ts" }, "dependencies": { - "@visactor/vrender": "workspace:0.18.10", - "@visactor/vrender-core": "workspace:0.18.10", - "@visactor/vrender-kits": "workspace:0.18.10", - "@visactor/vrender-components": "workspace:0.18.10" + "@visactor/vrender": "workspace:0.18.11", + "@visactor/vrender-core": "workspace:0.18.11", + "@visactor/vrender-kits": "workspace:0.18.11", + "@visactor/vrender-components": "workspace:0.18.11" }, "devDependencies": { "@rushstack/eslint-patch": "~1.1.4",