Class: AnnotationManager
Class for all annotation related operations.
Constructors
new AnnotationManager()
new AnnotationManager(
document
):AnnotationManager
Parameters
• document: Document
Returns
Methods
add()
add(annotation)
add(
annotation
):Promise
<void
>
Adds a single annotation to the document.
Parameters
• annotation: Annotation
The annotation to be added.
Returns
Promise
<void
>
add(annotations)
add(
annotations
):Promise
<void
>
Adds multiple annotations to the document.
Parameters
• annotations: Annotation
[]
An array of annotations to be added.
Returns
Promise
<void
>
bringToBack()
bringToBack(
annotation
):void
Experimental
Brings the specified annotation to the back, making it appear below other annotations.
Parameters
• annotation: Annotation
The annotation to bring to the back.
Returns
void
bringToFront()
bringToFront(
annotation
):void
Experimental
Brings the specified annotation to the front, making it appear above other annotations.
Parameters
• annotation: Annotation
The annotation to bring to the front.
Returns
void
copy()
copy(
annotation
):void
Experimental
Creates a copy of the specified annotation.
Parameters
• annotation: Annotation
The annotation to be copied.
Returns
void
delete()
delete(annotation)
delete(
annotation
):Promise
<void
>
Deletes a single annotation from the document.
Parameters
• annotation: Annotation
The annotation to be deleted.
Returns
Promise
<void
>
delete(annotations)
delete(
annotations
):Promise
<void
>
Deletes multiple annotations from the document.
Parameters
• annotations: Annotation
[]
An array of annotations to be deleted.
Returns
Promise
<void
>
delete(annotationId)
delete(
annotationId
):Promise
<void
>
Experimental
Deletes an annotation by its ID from the document.
Parameters
• annotationId: string
The ID of the annotation to be deleted.