Frameworks
Integrations
Mendix
SharePoint
Modular UI
Legacy UI
AnnotationManager
Annotation Types
Customize
Version 11
Version 10
v10.12
v10.11
v10.10
v10.9
v10.8
v10.7
v10.6
v10.5
v10.4
v10.3
v10.2
v10.1
v10.0
Version 8
v8.12
v8.11
v8.10
v8.9
v8.8
v8.7
v8.6
v8.5
v8.4
v8.3
v8.2
v8.1
v8.0
Version 7
Version 6
v6.3
v6.2
v6.1
v6.0
Version 5
Version 4
Version 3
Version 2
WebViewer Server
WebViewer BIM
In realtime collaboration, a client will merely act as a listener or trigger for events upon data creation/modification/deletion updating the current user or sending updates to other users.
main.js
.$(document).ready()
. Initial document can be any PDF or XOD file.server.js
. A firebase.User object will be passed as a parameter.server.js
.uid
in the authorId
variable, which will be used for client-side annotation permission checks.server.checkAuthor
with parameters authorId
, openReturningUserPopup
function and openNewUserPopup
function. These functions will be discussed in next steps.annotationCreated
, annotationUpdated
and server.annotationDeleted
events. A data object will be passed as a parameter. For more information, refer to firebase.database.DataSnapshot.openReturningAuthorPopup
is a callback function triggered when author data is found in the database. It will receive authorName as a parameter, and open a popup with the authorName as a visual feedback.openNewAuthorPopup
is a callback function triggered when author data is not found. Then we will open a popup for a new author to setup an author name.updateAuthor
is a function which will set author name in both client and server using annotationManager.setCurrentUser and server.updateAuthor
, respectively.annotationCreated
, annotationUpdated
and server.annotationDeleted
events. A data object will be passed as a parameter. For more information, refer to firebase.database.DataSnapshot.onAnnotationCreated
and onAnnotationUpdated
have the exact same behavior in this guide. They will use annotManager.importAnnotCommand
to update the viewer with the xfdf change.authorId
for the updated annotation to control client-side permission of the created/updated annotation.onAnnotationDelete
creates a delete command string from the annotation's id and is simply able to call importAnnotCommand on it.e
, has a property imported
that is set to true
by default for annotations internal to the document and annotations added by importAnnotCommand
or importAnnotations
.add
and modify
action types.server.createAnnotation
or server.updateAnnotation
which needs four variables: annotationId
, authorId
, parentAuthorId
and xfdf
.annotationId
can be retrieved from annotation.Id.authorId
was saved as a reference when user logged in.parentAuthorId
refers to the parent annotation's author id, if any. This will be used to distinguish replies, and will be referenced in server-side permission. Thus, we retrieve authorId
of the parent annotation by using annotation.InReplyTo, which returns the annotation id of the parent annotation.xfdf
can be retrieved using annotationManager.getAnnotCommand
. It will get an XML string specifying the added, modified and deleted annotations, which can be used to import the annotation using annotationManager.importAnnotCommand
in server data callback functions.annotManager.setPermissionCheckCallback
. The default is set to compare the authorName. Instead, we will compare authorId created from the server.Did you find this helpful?
Trial setup questions?
Ask experts on DiscordNeed other help?
Contact SupportPricing or product questions?
Contact Sales