Search
Diagram Class
Remarks See Also
 





The Diagram class represents a flow diagram.

Namespace: MindFusion.Diagramming
File: Diagram.js

 Syntax

JavaScript  Copy Code

// class
Diagram.prototype = {}

 Remarks

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.

Managing items

Items can be created by using the new operator and added to the diagram by means of the addItem method. Items can be deleted by calling the removeItem method. 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, for example createShapeNode and createDiagramLink.

Controlling Users' Actions

Users actions can be validated by handling various events, fired while items are being created, modified or deleted. The allowInplaceEdit property controls whether users are allowed to edit text by double clicking on items.

 Inheritance Hierarchy

MindFusion.Diagramming.DiagramBase
    MindFusion.Diagramming.Diagram
        MindFusion.Diagramming.DiagramPage

 See Also