Class mindmaps.MindMap
Defined in: MindMap.js.
Constructor Attributes | Constructor Name and Description |
---|---|
mindmaps.MindMap(root)
Creates a new mind map.
|
Field Attributes | Field Name and Description |
---|---|
nodes is only used for quick lookup of a node by id.
|
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.
|
getRoot()
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> |
toJSON()
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().