ASP.NET Pack Programmer's Guide
Diagram Class
Remarks See Also
 





The Diagram class represents a flow diagram.

Namespace: MindFusion.Diagramming
Package: 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 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.

Controlling Users' Actions

Users actions can be validated by handling various events, fired while items are being created, modified or deleted. The setInplaceEdit/getInplaceEdit methods control whether the user is allowed to do some in-place editing of items.

 See Also

Diagram Members
MindFusion.Diagramming Namespace