Class: WebViewerServerAnnotationManager

Core. WebViewerServerAnnotationManager

An object which manages anonymous user annotations when using WebViewerServer.

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
docId string The document ID of the object to intiate annotation collaboration on.
serverRoot string The webViewerServer annotation server to contact for annot storing.
docViewer Core.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
An Array.<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
username string user name as specified by webViewerServer collaboration.
userId string user ID as specified by webViewerServer collaboration.