Framework 0.2 Released!

After a bit of a delay, Constellation Framework 0.2 has finally been released. The new version includes support for Flex components inside node and edge renderers, layout behaviors which target a subset of nodes, and additional advanced graph processing methods.

Basic Node and Edge Renderers

Framework 0.2 also includes basic node and edge renderer classes which implement commonly-used functionality to make it even easier to create custom node and edge renderers. These renderer classes include position validation, mouse interaction handlers, and data change handlers.

These are four basic renderer classes:

  • BasicFlashNodeRenderer
  • BasicFlashEdgeRenderer
  • BasicFlexNodeRenderer
  • BasicFlexEdgeRenderer

Behavior.nodeRendererFilterFunction

The nodeRendererFilterFunction property defines a function which is used to determine which nodes will be influenced by the behavior. The function must take an INodeRenderer as its only argument and returns a boolean indicating whether the node renderer is affected by the behavior.

This is useful if you have groups of nodes that behave differently. For example, you may want certain nodes to experience a downward force so they tend toward the bottom of the visualization.

LinkedNode

The LinkedNode class received some optimizations and additional methods for manipulating graph data.

getDirectPredecessorNodes and getDirectSuccessorNodes
This is a much more convenient way to get a node's parents or children.
getTree
getTree has been optimized and can now set a property on each node indicating its depth in the tree. The new result parameter lets you decide whether the return value is a Graph or a LinkedGraph.
getPathToNode
getPathToNode has been optimized and can now set a property on each node indicating the distance from the start node.
getShortestPathsToNode
This new method finds the shortest path to the given node and returns all paths with that length. Each path is returned as an element in an array.
getSubTree
Unlike getTree which returns all of a node's neighbors and their neighbors, etc., getSubTree only returns the root node's child nodes and their child nodes, etc. The ancestry can be determined by the IEdge directionality (tail to head) or a customizable depth parameter stored in each node.