[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
Labels
Need Improvement
Lack of information or incorrect format
status: waiting for maintainer
These issues have not yet been reviewed by a maintainer
Describe the bug / 问题描述
使用Polyline 折线并设置router为orth 点击创建边或拖拽创建边控制台都会报错,官网案例加上
edge: { type: 'polyline', style: { router: { type: 'orth' } } }
鼠标在点击节点开始创建线后在图中多次移动后出现。
Reproduction link / 复现链接
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 / 操作系统
Browser / 浏览器
The text was updated successfully, but these errors were encountered: