We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
graph.getNodes() 返回的nodes数组的顺序不准确,没有按照实际数组顺序返回。
项目使用中的实际问题,无法提供复现链接
无
返回的节点顺序和实际数据顺序一致。
No response
The text was updated successfully, but these errors were encountered:
没有按照实际数组返回是指什么?有具体的 demo 吗?
Sorry, something went wrong.
这个问题我这边已经查清楚了,x6 现在的逻辑是按照 zIndex来排序cells,我这边的需求是递归树渲染,因为没有相应的layout,只能自己编写整个布局逻辑,同时有对layout进行编辑的操作,需要每次编辑(比如添加,删除)后对原有树的数据进行获取并重新渲染,所以需要使用 graph.getNodes() 获取上一帧的数据结构,而数据的顺序就至关重要了,最后我通过删除 zIndex,使用默认排序获取的 nodes 完成了重渲染。所以如果有必要的话,可以考虑加个 sort 属性进行cells的排序,当然这需要你们的论证。
@jiankafei 节点的 data 里面可以自定义数据,可以将 sort 属性放在你的 data 中。
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.
No branches or pull requests
问题描述
graph.getNodes() 返回的nodes数组的顺序不准确,没有按照实际数组顺序返回。
重现链接
项目使用中的实际问题,无法提供复现链接
重现步骤
无
预期行为
返回的节点顺序和实际数据顺序一致。
平台
屏幕截图或视频(可选)
No response
补充说明(可选)
No response
The text was updated successfully, but these errors were encountered: