Constructor
new L3D.GraphManager()
Methods
createNode(type, options) → nullable GraphNode
Create a node of the given registered type.
type |
String | The registered type name of the node to create. |
options |
Object | Optional configuration options for the node. |
- GraphNode
The new node, or null if one couldn't be created.
getNodeClass(type, The)
Returns a registered node type with the given name.
type |
String | The registered type name of the node |
The |
Class | registered node class. |
registerNodeType(type, nodeClass, skipUpdate)
Register a node class.
type |
String | The name of the node type, used to create the node with createNode. |
nodeClass |
String | The class of the node. |
skipUpdate |
bool | If true, updateCategoryMap won't be called. |
unregisterNodeType(type)
Removes a node type from the system.
type |
can be either a string node type name, or a GraphNode class |
updateCategoryMap() → Map
Updates the category map for registered nodes, used by the Editor for node menus. Categories can be hierarchical, so each item in the category map can either be a GraphNode class, or another Map. The category map is stored in the categoryMap property.
- Map
The resulting categoryMap.