MindFusion.Diagramming for JavaScript Programmer's Guide

Diagram Methods

 


 Public Methods

  Name Description

addEventListener

Registers a single event listener on the Diagram.

addItem

Adds an item to the Diagram.

alignPointToGrid

Returns a point of the alignment grid nearest to the onepassed as an argument.

arrange

Arranges the diagram with the given layout.

beginEdit

Begins in-place editing of the specified object.

clearAll

Removes all items from the diagram.

dispose

Overrides Component.Dispose

endEdit

Exits the in-place editing mode and either accepts or rejects the changes made to the item's text.

getActiveItem

Gets the active diagram element.

getAlignToGrid

Gets a value indicating whether the diagram items should be aligned to a grid.

getAllowInplaceEdit

Gets a value indicating whether in-place editing of the text of objects is enabled.

getBackBrush

Gets the object used for painting the diagram background.

getBehavior

Gets a value indicating how the control responds to user actions.

getContentBounds

Returns the smallest rectangle that bounds all diagram items.

getDefaultShape

Gets the default Shape of shapeNode-s.

getDelKeyAction

Gets a value that specifies what action should be performed when the user hits the Del key.

getEnabled

Checks if mouse events are enabled.

getExpandOnIncoming

Gets a value indicating the link direction in which tree branches are expanded.

getFactory

Gets a Factory instance that lets you add programmatically new items to the diagram.

getFont

Gets the font for text written on diagram items.

getGridColor

Gets the color of the grid points.

getGridOffsetX

Gets the horizontal offset of the first point of the alignment grid.

getGridOffsetY

Gets the vertical offset of the first point of the alignment grid.

getGridPointSize

Gets the size of shapes used to represent grid points.

getGridSizeX

Gets the horizontal distance between adjacent grid points.

getGridSizeY

Gets the vertical distance between adjacent grid points.

getGridStyle

Gets the visual style of the alignment grid.

getItemAt

Overloaded.  

getItemsAt

Finds and returns an array of the diagram items found at the specified location.

getLinkAt

Finds and returns the topmost DiagramLink found at the specified location.

getLinkBaseShape

Gets the shape displayed at the base of new links.

getLinkBaseShapeSize

Gets the default size of the base of new links.

getLinkBrush

Gets the default fill of links.

getLinkHeadShape

Gets the shape displayed as head of new links.

getLinkHeadShapeSize

Gets the default size of arrowheads.

getLinkPen

Gets the default stroke of links.

getLinksAt

Finds and returns an array of the diagram DiagramLink-s found at the specified location.

getLinkShape

Gets the initial shape assigned to new links.

getNearestNode

Returns the node nearest to the specified point.

getNodeAt

Overloaded.  

getNodesAt

Finds and returns an array of the DiagramNode-s found at the specified location.

getNodesExpandable

Gets a value indicating whether newly created nodes can be expanded.

getRouteLinks

Gets a value indicating whether links should avoid nodes by going the shortest path from their origin to their destination without crossing any other nodes.

getRouteMargin

Gets the minimal distance between nodes and auto-routed links.

getScrollX

Gets the diagram's horizontal scroll position.

getScrollY

Gets the diagram's vertical scroll position.

getSelection

Gets a Selection instance that represents the selection of items in this diagram.

getShapeBrush

Gets the default fill of shape nodes.

getShapePen

Gets the default stroke of shape node-s.

getShowAnchors

Gets a value indicating whether and when anchor point marks are displayed.

getShowGrid

Gets a value indicating whether the alignment grid is visible.

getViewport

Returns the visible portion of the diagram area.

initialize

Overrides Component.Initialize

raiseClicked

Raises an event which notifies that a Diagram item has been clicked.

raiseCreated

Raises an event which notifies that a DiagramItem has been created.

raiseDeleted

Raises an event which notifies that a DiagramItem has been deleted.

raiseEvent

Raises an event.

raiseModified

Raises an event which notifies that a DiagramItem has been modified.

registerForSubmit

Registers an onsubmit handler for the Diagram's parent html form to flush postback data.

removeEventListener

Removes a single event listener attached to the Diagram.

removeItem

Removes the specified item from the Diagram.

resizeToFitItems

Resizes the document scrollable area so that it fits all diagram items.

routeAllLinks

Routes all links in the diagram in such a way they do not cross nodes.

scrollTo

Scrolls the diagram to the specified point.

setAlignToGrid

Sets a value indicating whether the diagram items should be aligned to a grid.

setAllowInplaceEdit

Sets a value indicating whether in-place editing of the text of objects is enabled.

setBackBrush

Sets an object used for painting the diagram background.

setBehavior

Sets a value indicating how the control responds to user actions.

setDefaultShape

Sets the default shape of shape nodes.

setDelKeyAction

Sets a value that specifies what action should be performed when the user hits the Del key.

setEnabled

Enables or disables handling of mouse events.

setExpandOnIncoming

Sets a value indicating the link direction in which tree branches are expanded.

setFont

Sets the font for text written on DiagramItem-s.

setGridColor

Sets the color of the grid points.

setGridOffsetX

Sets the horizontal offset of the first point of the alignment grid.

setGridOffsetY

Sets the vertical offset of the first point of the alignment grid.

setGridPointSize

Sets the size of shapes used to represent grid points.

setGridSizeX

Sets the horizontal distance between adjacent grid points.

setGridSizeY

Sets the vertical distance between adjacent grid points.

setGridStyle

Sets the visual style of the alignment grid.

setLinkBaseShape

Sets the Shape displayed at the base of new links.

setLinkBaseShapeSize

Sets the default size of the base of new links.

setLinkBrush

Sets the default fill of links.

setLinkHeadShape

Sets the Shape displayed as head of new links.

setLinkHeadShapeSize

Sets the default size of arrowheads.

setLinkPen

Sets the default stroke of links.

setLinkShape

Sets the initial shape assigned to new links.

setNodesExpandable

Sets a value indicating whether newly created nodes can be collapsed and expanded by users.

setRouteLinks

Sets a value indicating whether links should avoid nodes by going the shortest path from their origin to their destination without crossing any other nodes.

setRouteMargin

Sets the minimal distance between nodes and auto-routed links.

setScrollX

Sets the diagram's horizontal scroll position.

setScrollY

Sets the diagram's vertical scroll position.

setShapeBrush

Sets the default fill of shape nodes.

setShapePen

Sets the default stroke of shape nodes.

setShowAnchors

Sets a value indicating whether and when anchor point marks are displayed.

setShowGrid

Sets a value indicating whether the alignment grid is visible.

setZoomFactorPivot

Sets the zoom factor, preserving the on-screen position of the specified diagram point.

zoomToFit

Zooms the view to fit the document contents in the Diagram client area.

zoomToRect

Zooms and scrolls the view to fit the specified document rectangle in the Diagram's visible area.

 See Also