antvis/G6

Do you want to work on this issue?

You can request for a bounty in order to promote it!

[Bug]:[V5] Using Polyline and setting router to orth will result in an error when you click to create an edge or drag and drop to create an edge #6654

FESSXX posted onGitHub

Describe the bug / 问题描述

使用Polyline 折线并设置router为orth 点击创建边或拖拽创建边控制台都会报错,官网案例加上 edge: { type: 'polyline', style: { router: { type: 'orth' } } } 鼠标在点击节点开始创建线后在图中多次移动后出现。 image

No response

Steps to Reproduce the Bug or Issue / 重现步骤

import { Graph } from '@antv/g6';

const graph = new Graph({ container: 'container', data: { nodes: [ { id: 'node1' }, { id: 'node2' }, { id: 'node3' }, { id: 'node4' }, { id: 'node5' } ], edges: [ { source: 'node1', target: 'node2' }, { source: 'node1', target: 'node3' }, { source: 'node1', target: 'node4' }, { source: 'node2', target: 'node3' }, { source: 'node3', target: 'node4' }, { source: 'node4', target: 'node5' }, ], }, layout: { type: 'grid', }, edge: { type: 'polyline', style: { router: { type: 'orth', }, }, }, behaviors: [ { type: 'create-edge', trigger: 'click', style: { stroke: 'red', lineWidth: 2, }, }, ], });

graph.render();

G6 Version / G6 版本

🆕 5.x

OS / 操作系统

  • macOS
  • Windows
  • Linux
  • Others / 其他

Browser / 浏览器

  • Chrome
  • Edge
  • Firefox
  • Safari (Limited support / 有限支持)
  • IE (Nonsupport / 不支持)
  • Others / 其他

posted by FESSXX 4 months ago

Please provide more information, or use the standard format, otherwise we will not process this issue. Reference document:


请提供更多信息,或者使用规范的格式,否则我们不会处理这个 issue。 参考文档:

posted by github-actions[bot] 4 months ago

Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests