Class Index | File Index

Classes


Class mindmaps.MindMap


Defined in: MindMap.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Creates a new mind map.
Field Summary
Field Attributes Field Name and Description
 
nodes is only used for quick lookup of a node by id.
Method Summary
Method Attributes Method Name and Description
 
addNode(node)
Adds an existing node and all its children to the nodes map.
 
Create a node and add to nodes map.
<static>  
mindmaps.MindMap.fromJSON(json)
Creates a new mind map object from JSON String.
<static>  
mindmaps.MindMap.fromObject(obj)
Creates a new mind map object from generic object.
 
Get the root of the mind map.
 
removeNode(node)
Removes a node from the mind map.
 
Creates a JSON representation of the mind map.
<private>  
Called by JSON.stringify().
Class Detail
mindmaps.MindMap(root)
Creates a new mind map.
Parameters:
{mindmaps.Node} root Optional
Field Detail
nodes
nodes is only used for quick lookup of a node by id. Each node must be registered in this map via createNode() or addNode(node).
Method Detail
addNode(node)
Adds an existing node and all its children to the nodes map.
Parameters:
{mindmaps.Node} node

{mindmaps.Node} createNode()
Create a node and add to nodes map.
Returns:
{mindmaps.Node}

<static> {mindmaps.MindMap} mindmaps.MindMap.fromJSON(json)
Creates a new mind map object from JSON String.
Parameters:
{String} json
Returns:
{mindmaps.MindMap}

<static> {mindmaps.MindMap} mindmaps.MindMap.fromObject(obj)
Creates a new mind map object from generic object.
Parameters:
{Object} obj
Returns:
{mindmaps.MindMap}

{mindmaps.Node} getRoot()
Get the root of the mind map.
Returns:
{mindmaps.Node}

removeNode(node)
Removes a node from the mind map. Severs tie to the parent.
Parameters:
{mindmaps.Node} node

{String} serialize()
Creates a JSON representation of the mind map.
Returns:
{String}

<private> toJSON()
Called by JSON.stringify().

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jul 18 2011 18:03:15 GMT+0000 (WEST)