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
---原始邮件---
发件人: ***@***.***>
发送时间: 2024年3月20日(周三) 下午5:02
收件人: ***@***.***>;
抄送: ***@***.******@***.***>;
主题: Re: [antvis/G6] G6节点x,y坐标读取错误 (Issue #5492)
请问解决了嘛?我也获取不到正确的坐标
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
问题描述
![image](https://github.com/antvis/G6/assets/43475070/ab2bc5a3-47dc-4a42-a8f1-6fb4c48baf0e) 如截图所示,使用G6绘制自定义节点且为树状图展示时,为了方便拖拽父元素子元素随之更新位置进行移动,此处使用方法获取子元素model和父元素model。但是遇到问题打印出来的model里面的x,y值和model.x,model.y输出值不一致。 后续在生成graph.data(data)中的data数据的nodes数据时增加x,y默认值此现象消失重现链接
https://g6.antv.vision/zh/examples/net/dagreFlow/#basicDagre
重现步骤
1.绘制流程图
https://g6.antv.vision/zh/examples/net/dagreFlow/#basicDagre
2.采用自定义节点
3.graph.data(data)其中data的nodes数据设置时不设置x,y
4.graph.findById获取对应节点
5.获取上述节点的model。 nodes.getModel() 同时打印
6.打印nodesModel.x,nodesModel.y数据不一致
预期行为
未设置x,y时数据读取展示也能一至
平台
屏幕截图或视频(可选)
![image](https://github.com/antvis/G6/assets/43475070/ab2bc5a3-47dc-4a42-a8f1-6fb4c48baf0e)补充说明(可选)
业务需求,树形显示组织架构并且支持拖拽进行更新组织架构
The text was updated successfully, but these errors were encountered: