-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
edge:added 事件里面 edge.target.cell取不到值 #3814
Comments
Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. |
那是创建开始触发的,所以没有,你可以监听 edge:connected 事件 |
好的 谢谢 |
This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread. |
问题描述
graph.on('edge:added', (item) => {
const edge = item.edge;
console.log(edge);
console.log(edge.source);
console.log(edge.target);
console.log(edge.target.cell);
})
新增一个edge后,source可以正常取到,target取到的值发生了变化
重现链接
https://x6.antv.vision/zh/examples/showcase/faq#validate-connection%E5%8F%AF%E5%A4%8D%E7%8E%B0%E9%97%AE%E9%A2%98
重现步骤
2.把这串代码加到最后
graph.on('edge:added', (item) => {
const edge = item.edge;
console.log(edge);
console.log(edge.source);
console.log(edge.target);
console.log(edge.target.cell);
})
3.取到的target不符合预期 没有cell和port
预期行为
期望打印出的target对象是{cell: "xxx", port: "xxx"}
实际打印出来的target对象是{x: number, y: number}
平台
屏幕截图或视频(可选)
补充说明(可选)
No response
The text was updated successfully, but these errors were encountered: