Main object types

The Dojo Diagrammer component set includes the following main classes:
  • Diagram: The main entry point to the Dojo Diagrammer component. It is a Dijit widget created in HTML markup.
  • Graph: The container for nodes and links. The Diagram widget contains the top-level Graph instance that holds the main graph. The Graph component is also used to represent nested graphs through the Subgraph object.
  • GraphElement: The base class of any element in a graph. This class generates the IDs of the elements and maintains a full list of element connections that are disconnected when the dispose function is called.
  • Node: A node of the graph. The node holds a list of anchor points to which links can connect. The graphical content of the node can be customized by specifying a JSON (JavaScript Object Notation) template.
  • Link: A connection line between two nodes: the start node and the end node. A link is often represented as a polyline with an arrow at its end, but it can also be customized using a JSON template. The link shape can be computed automatically.
  • PortBase: A connection point between a link and a node. There are two predefined port types: BasicPort connects the link to a fixed point on the bounding box of the node; AutomaticPort connects the link to the middle of the closest side of the node.
  • Subgraph: A subclass of the Node class that contains an embedded graph. The Subgraph object makes it possible to represent nested graphs, that is, a graph inside a graph.
  • GraphLayout: The base class for graph layout algorithms.