new BlackBoxAnnotationManager(serverRoot, docViewer)
Creates a new instance of BlackBoxAnnotationManager.
* Note: As of version 6.3, directly constructing a BlackBoxAnnotationManager is deprecated and the capability will be removed in a future version. Please use the CoreControls#getBlackBoxAnnotationManager function instead.
Parameters:
| Name | Type | Description |
|---|---|---|
serverRoot |
string | The blackbox annotation server to contact for annot storing. |
docViewer |
CoreControls.DocumentViewer |
Methods
-
disableCollaboration()
-
Disables collaboration by closing the annotation server connection.
-
initiateCollaboration(The)
-
Opens a connection to the annotation server and sets up collaboration.
Parameters:
Name Type Description Thestring document ID of the object to intiate annotation collaboration on. -
preloadAnnotations(An)
-
Preloads existing annotations made without realtime collaboration enabled, will only trigger once on initial collaboration enabling event.
Parameters:
Name Type Description AnArray.<Annotations.Annotation> array of annotation objects.
Events
-
blackBoxAnnotationsDisabled
-
Triggered when collaboration has abruptly closed or been disabled. Attach like bbAnnotManager.on('blackBoxAnnotationsDisabled', callback)
-
blackBoxAnnotationsEnabled
-
Triggered when collaboration is enabled for blackbox. Attach like bbAnnotManager.on('blackBoxAnnotationsEnabled', callback)
Parameters:
Name Type Description usernamestring user name as specified by blackbox collaboration. userIdstring user ID as specified by blackbox collaboration.