Releases: antvis/X6
Releases · antvis/X6
3.1.1
What's Changed
- fix: editor tool when editing by @GaoFuhong in #4943
- feat(site): 重构examples中edge边右键菜单和tooltip实现 by @Totoro-jam in #4940
- feat(demo/case/timeline): 新增简单和复杂时间轴示例 by @Totoro-jam in #4947
- chore: change @ to full path by @GaoFuhong in #4949
Full Changelog: 3.1.0...v3.1.1
3.1.0
What's Changed
- chore: correct gh-pages about auto synchronize site by @GaoFuhong in #4916
- fix(examples/er): 优化er相关safari的兼容性表现 by @Totoro-jam in #4906
- fix(edge): safari中marker标记不渲染的判断更新并增加针对safari兼容的test by @Totoro-jam in #4921
- fix: remove cells error with history plugin by @GaoFuhong in #4927
- docs: update x6-shape 3.x by @GaoFuhong in #4929
- feat: add virtual options and support react/vue/angular shape nodes virtual render by @GaoFuhong in #4935
- chore: publish 3.1.0 by @GaoFuhong in #4938
Full Changelog: v3.0.1...3.1.0
@antv/x6 3.0.1
重大变更
- 插件整合:所有
@antv/x6-plugin-xxxx包并入主包并统一导出,原有graph.use(new Xxx())用法保持不变,仅需替换导入路径(参见src/plugin/index.ts:1-11)。 - 动画 API:移除 2.x 的
transition用法,引入全新的动画系统animate,支持命令式/配置式/自定义 Shape 动效(参见src/model/animation/animation.ts:10-21,src/model/animation/index.ts:1-8)。 - 交互默认值调整:画布平移
panning默认开启;当使用Scroller时为避免交互冲突,默认禁用画布panning(参见文档site/docs/tutorial/update.zh.md:69-71)。
功能增强
- 虚拟渲染能力:在大图场景可开启
virtual: true,仅渲染可视区域并自动加入缓冲边距以提升性能(参见src/graph/virtual-render.ts:94-106;示例见site/examples/showcase/practices/demo/virtualRender.ts:7-15)。 - 动画系统:提供
Animation、KeyframeEffect与AnimationManager,支持播放、暂停、反向、速率调整与完成/取消事件(参见src/model/animation/animation.ts:75-144,src/model/animation/animationManager.ts:3-19,src/model/animation/index.ts:1-8)。 - 插件统一导出:
Clipboard、Dnd、Export、History、Keyboard、Selection、MiniMap、Scroller、Stencil、Snapline、Transform统一从@antv/x6导出(参见src/plugin/index.ts:1-11)。
优化
- 交互体验:
panning默认开启,Selection在与panning触发冲突时具备更合理的优先级(参见site/docs/tutorial/update.zh.md:69-71)。 - 虚拟渲染性能:滚动/平移/缩放事件节流控制与渲染区域动态扩展(固定边距 120px)(参见
src/graph/virtual-render.ts:15-18,99-103)。
迁移指南
-
升级依赖:
{ "dependencies": { "@antv/x6": "^3.0.0" } } -
移除旧插件依赖:
@antv/x6-plugin-selection、@antv/x6-plugin-transform、@antv/x6-plugin-scroller、@antv/x6-plugin-keyboard、@antv/x6-plugin-history、@antv/x6-plugin-clipboard、@antv/x6-plugin-snapline、@antv/x6-plugin-dnd、@antv/x6-plugin-minimap、@antv/x6-plugin-stencil、@antv/x6-plugin-export(参见site/docs/tutorial/update.zh.md:30-43)。 -
替换导入路径:
// 2.x import { Scroller } from '@antv/x6-plugin-scroller' import { Selection } from '@antv/x6-plugin-selection' graph.use(new Scroller()) graph.use(new Selection()) // 3.x import { Scroller, Selection } from '@antv/x6' graph.use(new Scroller()) graph.use(new Selection())
-
动画迁移:将 2.x 的
transition用法迁移至 3.x 的animate能力,参考动画文档与 API(参见site/docs/tutorial/update.zh.md:61-66)。 -
配置检查:
- 若需要关闭画布平移,显式设置
panning: false。 - 使用
Scroller时可开启virtual: true以优化大图渲染。
- 若需要关闭画布平移,显式设置
v2.19.0 [Deprecated]
2.19.0 (2025-10-20)
Bug Fixes
exportPNGnot display image markup (#4672) (3bd73a2)- If the starting or ending point is the same as the intersection… (#4279) (0bbff8f)
- 🐛 char ghosting when edit text (#2560) (#3043) (15284e7)
- "pnpm run build:watch" 在windows下无法正常运行 (#3888) (9823c7e)
- $stencil: compact mode Cannot add odd nodes (#3647) (9684766), closes #3535
- 浮点数精度丢失导致画布缩放卡死 (#4356) (78179da)
- 修复 Angular 组件内部无法使用外部服务的问题 (#4267) (3bb9bee)
- 修复 Angular Component 节点被移除时没有触发销毁的生命周期 (#3826) (8cf1ed4)
- 修复示例中react组件渲染报错的问题 (#4673) (7d434e6)
- 修正画布配置 onEdgeLabelRendered 类型使用问题并且完善文档说明 (#4691) (3eda631)
- add createView options (#3075) (96010e3)
- add defense for view in transform plugin (#3092) (fb8098c)
- add dependencies for x6-devtools (#3381) (37515c4)
- add excludeShapes options for manhattan router (#3334) (c76a23b)
- add execute permission (5cd3809)
- add getGraph provide (#3072) (a98e97d)
- add judgment for edge view (#3282) (946582c)
- add key for portal to avoid rerender (#4183) (5ebb6d3)
- add missing script for building style (e683155)
- add padding options for position api (#3225) (8fada57)
- add tests for geometry (#4728) (e1d6ed0)
- add textLength & lengthAdjust to CASE_SENSITIVE_ATTR (#3281) (76fb1ac)
- add timeout to wait target node is connected (#3392) (adc06ad)
- arrowhead not get options bug (#3065) (3b668fe)
- avoid access document or window in server side (#4101) (31be706)
- bind dragstart after add group (#4131) (8030621)
- bind minimap plugin to graph without scroller (#4167) (f6475ac)
- broken file (d6df2d5)
- bump rule (c9559f2)
- cache auto generated style file (ffbaec3)
- cancel debounce update for scroller plugin (#3027) (abeb009)
- cannot be invoked without new (#3296) (7656b38)
- cannot read properties of undefined when unmount vue component (#3024) (187e318)
- Cannot use "this" here: #2824 (#2855) (10347d0)
- change dragging container options (#3139) (7b091f3)
- change update prioriy in render (#3740) (ce15fba)
- check labelNode existed before change postion (#3737) (90324fc)
- clear old background when background enabled in background (#3192) (17b36e2)
- codecov (7a7f9b7)
- commit message E2BIG (a2c5f9e)
- commit message for release (e05aa85)
- confirm viewitem exist (#3357) (8b1f661)
- consider transform when calc bbox (#3770) (8ecfc86)
- correct boundary tool position when setting local to true (#4820) (7afea2c)
- correct button tool position when setting local to true (#4817) (3f7b72b)
- create empty 'releasing' file for pr (9f0f782)
- debounce update to improve performance (#3061) (9e37ea9)
- deep clone instead of shallow clone (#2924) (75f4297)
- delete return selection (#4026) (0178e48)
- deps version (2aff4b4)
- destroy custom label before render (#4146) (281209a)
- do not exec gh-pages deploy on pull_request (#4687) (bdfdadd)
- doc incorrect text (#3862) (b5cc1dc)
- doc path in .dumirc.ts (#4699) (440781e)
- dom matrix tests (#4721) (ef0089c)
- dom.data support custom object (#2954) (c350371)
- don't dispose graph view (#4023) (3141593)
- don't hide when click on color picker ([#3172](https:...