You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.
We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
Describe the bug
https://x6.antv.antgroup.com/zh/examples/node/native-node/#path
import { Graph } from '@antv/x6'
const graph = new Graph({
container: document.getElementById('container'),
grid: true,
})
graph.addNode({
shape: 'path',
x: 40,
y: 40,
width: 100,
height: 80,
label: 'path',
// 使用 path 属性指定路径的 pathData,相当于指定路径的 refD 属性
// https://x6.antv.vision/zh/docs/api/registry/attr#refdresetoffset
path: 'M704.24,79.95 A 5.10 5.10 0 0 1 704.24 90.15',
attrs: {
body: {
fill: '#efdbff',
stroke: '#9254de',
},
},
})
官方url路径下,执行后报错,Uncaught Error: Invalid path segment type "N"。
将 path属性值的改为:'M704.24,79.95 A 5.10 5.10 0 0 1 704.24 90.14', 执行无错误。
Your Example Website or App
https://x6.antv.antgroup.com/zh/examples/node/native-node/#path
Steps to Reproduce the Bug or Issue
见bug描述。
x6版本 2.11.1。
调试发现,在x6-geometry包下 src/path/normalize.ts。 a2c函数中 Math.asin值小于-1导致返回NAN。
Expected behavior
path: 'M704.24,79.95 A 5.10 5.10 0 0 1 704.24 90.15' 无报错。
Screenshots or Videos
No response
Platform
Additional context
No response
The text was updated successfully, but these errors were encountered: