antvis/G6

【V5】 参照示例使用Polyline 折线控制台报错,图正常 #5768

zhouyuyong posted onGitHub

Describe the bug

vue3 + g6 v5.0.37 参照示例使用Polyline 折线控制台报错,图渲染正常,多次拖动后图卡死,需要刷新页面才能继续操作,使用其他类型边控制台不报错,但是多次拖动后整体变得卡顿 image

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


你好,这边会尽快排查问题

posted by Aarebecca 11 months ago

正式版未发现该问题

posted by Aarebecca 10 months ago

正式版未发现该问题

您好,我用的5.0.1的版本,也是在edge配置了设置了router: true;的选项。控制台报错和题主一样的问题,请问在哪个版本修复了?

posted by yangyili 10 months ago

Fund this Issue

$0.00
Funded

Pull requests