antvis / antvis/G6

[Bug]: 5.0.50,创建正交边时js报错

Open
#7,531 2 comments 0 reactions 0 assignees View on GitHub
feature 💡
Dominant language
TypeScript
Stars
12.3k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

### Describe the bug / 问题描述

在5.0.50版本中,通过创建边行为创建边,边设置正交
edge: {
type: 'polyline',
style: {
router: {
type: 'orth'
},
},
}
边拖动但还未创建成功时(未连接到目标节点)js报:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'map')
at ft (umi.7c7a15f4.js:1:4109245)
at Dt (umi.7c7a15f4.js:1:4112219)
at Hr (umi.7c7a15f4.js:1:4170030)
at $r (umi.7c7a15f4.js:1:4170325)
at Lr (umi.7c7a15f4.js:1:4168806)
at n.value (umi.7c7a15f4.js:1:4188658)
at n.value (umi.7c7a15f4.js:1:4188764)
at n.value (umi.7c7a15f4.js:1:4188919)
at n.value (umi.7c7a15f4.js:1:4176587)
at n.value (umi.7c7a15f4.js:1:4179870)
at n.value (umi.7c7a15f4.js:1:4180103)
at n.value (umi.7c7a15f4.js:1:4132774)
at Xi (umi.7c7a15f4.js:1:4192685)
at Object.before (umi.7c7a15f4.js:1:4668808)
at umi.7c7a15f4.js:1:4636074
at Array.map ()
at e.value (umi.7c7a15f4.js:1:4635437)
at e.value (umi.7c7a15f4.js:1:4665479)
at e.value (umi.7c7a15f4.js:1:4664611)
at umi.7c7a15f4.js:1:4196531
at p (umi.7c7a15f4.js:1:7598067)
at Generator. (umi.7c7a15f4.js:1:7599394)
at Generator.next (umi.7c7a15f4.js:1:7598477)
at t (umi.7c7a15f4.js:1:7589491)
at s (umi.7c7a15f4.js:1:7589702)
at umi.7c7a15f4.js:1:7589761
at new Promise ()
at L. (umi.7c7a15f4.js:1:7589642)
at L. (umi.7c7a15f4.js:1:4196665)
at a (umi.7c7a15f4.js:1:1229096)
at e.emit (umi.7c7a15f4.js:1:1229109)
at t. (umi.7c7a15f4.js:1:4640566)
at e.value (umi.7c7a15f4.js:1:1597176)
at e.value (umi.7c7a15f4.js:1:1597000)
at e.value (umi.7c7a15f4.js:1:1592521)
at e.value (umi.7c7a15f4.js:1:1592204)
at Object.onPointerMove [as fn] (umi.7c7a15f4.js:1:1587156)
at e.value (umi.7c7a15f4.js:1:1591885)
at onPointerMove (umi.7c7a15f4.js:1:1668484)
at umi.7c7a15f4.js:1:1567335
at Array.forEach ()
at e.value (umi.7c7a15f4.js:1:1567312)
at HTMLDocument.l (umi.7c7a15f4.js:1:2147785)

### Reproduction link / 复现链接

https://g6.antv.antgroup.com/examples/behavior/create-edge/#by-click

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

打开连接,增加
edge: {
type: 'polyline',
style: {
increasedLineWidthForHitTesting: 10,
router: {
type: 'orth'
}
}
}
设置,然后触发创建边操作

### Version / 版本

🆕 5.x

### OS / 操作系统

- [ ] macOS
- [x] Windows
- [ ] Linux
- [ ] Others / 其他

### Browser / 浏览器

- [x] Chrome
- [ ] Edge
- [ ] Firefox
- [ ] Safari (Limited support / 有限支持)
- [ ] IE (Nonsupport / 不支持)
- [ ] Others / 其他

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by running the linked by-click create-edge example with the reported polyline edge and orth router settings. Reproduce the pointer-move failure before the edge reaches a target, then trace the edge-creation and orthogonal-routing path behind the reported undefined.map error. Done means incomplete edge creation no longer throws and a valid edge can still be created.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
data-visualization, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.