admin管理员组

文章数量:1384418

I need to create an hierarchical tree (something like this), but i need some features:

  1. Ability to design the nodes as i like (size, background image, fonts etc.)
  2. Automatic layout
  3. 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:

  1. Ability to design the nodes as i like (size, background image, fonts etc.)
  2. Automatic layout
  3. 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 badges
Add a ment  | 

2 Answers 2

Reset to default 4

Here 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