【V5】 参照示例使用Polyline 折线控制台报错,图正常 #5768
zhouyuyong posted onGitHub
Describe the bug
vue3 + g6 v5.0.37
参照示例使用Polyline 折线控制台报错,图渲染正常,多次拖动后图卡死,需要刷新页面才能继续操作,使用其他类型边控制台不报错,但是多次拖动后整体变得卡顿
Your Example Website or App
无
Steps to Reproduce the Bug or Issue
使用以下配置,应该和节点、边数据无关,使用示例中的任意类型变只有这个报错
edge: {
type: 'polyline',
style: {
router: true,
},
state: {
highlight: {
stroke: "#D580FF",
},
},
},
卡顿似乎和以下交互有关,去掉交互后拖拽元素较流畅 添加了以下交互 animation: true, behaviors: [ "drag-element", { type: "hover-element", enable: (event: any) => event.targetType === "node", degree: 1, // 👈🏻 Activate relations. activeState: "highlight", inactiveState: "dim", }, ],
Expected behavior
1.使用Polyline 折线控制台报错修复,图正常 2.图卡住,并且拖动节点明显感觉卡顿,体验感极差,节点数量不超过20。换其他类型边虽然不报错,但是经过多次拖动后明显感觉卡顿,试了多个类型的边都一样,删除内置交互”hover-element",拖拽不卡顿
Screenshots or Videos
No response
Platform
- OS: [macOS]
- Browser: [Chrome]
- Version: [v5.0.37]
Additional context
No response