问题
I need to create a topology (network) diagram, which will be integrated with my extJS application. Is anyone familiar with some Javascript packages with APIs for creating such a diagram, taking care of: positioning the nodes in the diagram, zooming, and dragging the nodes?
In addition I want to use some custom icons for the nodes in the diagram.
回答1:
You might look into yEd/yFiles (http://www.yworks.com/en/products_yed_about.html) It's java, not javascript, but it will definitely run as an applet since it does so from their site as a demo. Might work if this is for an intranet to just embed it in the middle of an extjs panel. Otherwise I recommend you read and re-read the drag and drop api for ExtJS and review the source code for them as well if you intend to code it yourself. Also from a google search:
http://www.jgraph.com/ (commercial)
http://www.jointjs.com/about.html (MIT Licenses)
来源:https://stackoverflow.com/questions/13398572/how-to-create-a-topology-diagram-using-javascript