admin管理员组文章数量:1384418
I need to create an hierarchical tree (something like this), but i need some features:
- Ability to design the nodes as i like (size, background image, fonts etc.)
- Automatic layout
- Ability to connect nodes by drag N' drop
I've looked at GoJs and its great, but it's canvas based, and i couldn't find a way to make the nodes look exactly as I want (actually not even remotely close).
I've also looked at d3.js which is also great but again, since it's SVG it's haard to design the nodes.
The main hustle here is the layout, and connecting the nodes, i can handle the Drag N' Drop my self, Is there a library out there that can handle the layout for me , so i can create the required div's, design them as i see fit and let the library do just the layout stuff?
I need to create an hierarchical tree (something like this), but i need some features:
- Ability to design the nodes as i like (size, background image, fonts etc.)
- Automatic layout
- Ability to connect nodes by drag N' drop
I've looked at GoJs and its great, but it's canvas based, and i couldn't find a way to make the nodes look exactly as I want (actually not even remotely close).
I've also looked at d3.js which is also great but again, since it's SVG it's haard to design the nodes.
The main hustle here is the layout, and connecting the nodes, i can handle the Drag N' Drop my self, Is there a library out there that can handle the layout for me , so i can create the required div's, design them as i see fit and let the library do just the layout stuff?
Share Improve this question asked Feb 19, 2013 at 10:06 TomerTomer 17.9k16 gold badges81 silver badges139 bronze badges2 Answers
Reset to default 4Here are some sample libraries.
If you want to avoid canvas, try implementing drag n drop for the following
CSS3 Family Tree
SlickMap
or else see some canvas based libraries
JavaScript InfoVis Toolkit's HyperTree / SpaceTree
jsPlumb
Whilst a late answer, hopefully it can help others in the future. Here is a drag and drop tree utilising the excellent D3.js library.
http://bl.ocks/robschmuecker/7880033
https://gist.github./robschmuecker/7880033
The tree in the example handles automatic layout/sizing, zooming, panning, drag and drop and is collapsible. All or none of the aspects can be removed if needed.
本文标签: javascriptComplex heirarchical tree layoutStack Overflow
版权声明:本文标题:javascript - Complex heirarchical tree layout - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744453805a2606889.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论