Skip to content
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

support auto layout ? #17

Open
zzwar2009 opened this issue May 21, 2020 · 1 comment
Open

support auto layout ? #17

zzwar2009 opened this issue May 21, 2020 · 1 comment

Comments

@zzwar2009
Copy link

first of all , thanks for your great work, it inspire me a lot , and I maybe write a react version according to your sourcecode.

my question is : if the node has no position(posi_x,posi_y) attribute , now can the diagram support auto layout ?

@murongqimiao
Copy link
Owner

Hello bro~ !
In my personal opinion , to put position attr in FE, is not appropriate ~
well well well 刚才看到你github里是中文commit 就直接中文回复你吧....
一般来说,数据是后端产生的, 数据清洗 -> 生成节点关系 -> 对应生成前端坐标即可~
如果前端写布局逻辑也没那么复杂~ 可以自己尝试一下~ 可以加qq群我们一起讨论
大概思路是把节点分级, 同级节点x轴坐标一致~ 同列节点y轴坐标一致即可~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants