AnnotationAPI#
Interface AnnotationAPI
Hierarchy
- AnnotationAPI
Methods
change Annotation
- change
Annotation(annotationId, properties): AnnotationProperties -
Changes one or more properties of an Annotation with the specified id.
Parameters
-
annotationId: number
The id of the Annotation you want to change.
-
properties: AnnotationProperties
The properties of the Annotation you want change.
Returns AnnotationProperties
An Object with the changed Properties.
-
- change
Annotation(annotationID, label?, visible?, anchorPosition?, labelPosition?, active?, transform?): void -
Parameters
-
annotationID: number
The ID of the Annotation.
-
Optional
label: stringThe text of the Annotation.
-
Optional
visible: booleanIndicates if the Annotation should be visible or hidden.
-
Optional
anchorPosition: Float32Array | number[]Anchor position in world space coordinates.
-
Optional
labelPosition: Float32Array | number[]The position of the label.
-
Optional
active: booleanDEPRECATED
-
Optional
transform: Float32Array | number[]The transformation of the Annotation.
Returns void
Deprecated
Changes an annotation.
-
create Annotation
- create
Annotation(properties?): number -
Creates a new Annotation.
Parameters
-
Optional
properties: AnnotationPropertiesInitial properties of the created Annotation.
Returns number
The id of the newly created Annotation.
-
- create
Annotation(nodeID, label, visible?, anchorPosition?, labelOffset?): number -
Parameters
-
nodeID: number
The ID of the node that the Annotation belongs to.
-
label: string
The text of the Annotation.
-
Optional
visible: booleanIndicates if the Annotation should be visible or hidden.
-
Optional
anchorPosition: Float32Array | number[]Anchor position in world space coordinates.
-
Optional
labelOffset: Float32Array | number[]The offset between anchorPosition and where the label should be displayed.
Returns number
The ID of the new annotation.
Deprecated
Creates a new annotation.
-
get Annotation Data
- get
Annotation Data(annotationId): AnnotationData -
Parameters
-
annotationId: number
The ID of the Annotation.
Returns AnnotationData
The content and properties of an annotation.
Deprecated
-
get Annotations
remove Annotation
request Annotation Data
- request
Annotation Data(annotationId): Promise<AnnotationProperties> -
Returns the AnnotationData for the specified Annotation id.
Parameters
-
annotationId: number
The id of the Annotation you want to request the data for.
Returns Promise<AnnotationProperties>
The requested Annotation data.
-
These functions allow the creation and management of Annotations.