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