Namespace: clbCollabNav¶
Local Navigation
Description¶
- clbCollabNav provides tools to create and manage
- navigation items.
Function: getRoot¶
Retrieve the root item of the given collab.
-
getRoot(collabId)¶ Arguments: - collabId (number) – collab ID
Return Promise: promise the root nav item
Function: getNode¶
-
getNode(collabId, nodeId)¶ Arguments: - collabId (number) – collab ID
- nodeId (number) – node ID
Return NavItem: the matching nav item
Function: getNodeFromContext¶
-
getNodeFromContext(ctx)¶ Arguments: - ctx (str) – The context UUID
Return Promise: The promise of a NavItem
Function: addNode¶
-
addNode(collabId, navItem)¶ Arguments: - collabId (number) – collab ID
- navItem (number) – the NavItem instance to add to the navigation
Return Promise: promise of the added NavItem instance
Function: deleteNode¶
-
deleteNode(collabId, navItem)¶ Arguments: - collabId (number) – collab ID
- navItem (NavItem) – the NavItem instance to remove from the navigation
Return Promise: promise of an undefined item at the end
Function: update¶
-
update(collabId, navItem)¶ Arguments: - collabId (number) – collab ID
- navItem (NavItem) – the instance to update
Return Promise: promise the updated instance
Function: insertNode¶
Insert node in the three.
A queue is used to ensure that the insert operation does not conflict on a single client.
-
insertNode(collabId, navItem, parentItem, insertAt)¶ Arguments: - collabId (int) – id of the collab
- navItem (NavItem) – Nav item instance
- parentItem (NavItem) – parent item
- insertAt (int) – add to the menu
Return Promise: a promise that will return the update nav item