The Diagram class represents a flow diagram.
Namespace: MindFusion.Diagramming
Package: Diagram.js
JavaScript Copy Code |
---|
// class |
A diagram can contain connected nodes and links. Nodes are instances of DiagramNode-derived classes. Nodes are stored in the nodes collection. Links in MindFusion.Diagramming for JavaScript are instances of the DiagramLink class and are stored in the links collection.
Items can be created by using the new operator and added to the diagram by means of the addItem method. Items are deleted by using the deleteItem method of the Diagram class. There are shortcut methods provided by the diagram's Factory object that can be used to create an item and add it to the diagram with just one method call. - they are createShapeNode and createDiagramLink.