Nutrient Web SDK

ReferenceIsEditableAnnotationCallback

Type Alias IsEditableAnnotationCallback

This callback defines which annotations are read-only. This callback will receive the Annotation a user wants to modify and by returning true or false you can define if the annotation should be read-only (false) or modifiable (true).

For more information, see Configuration#isEditableAnnotation.

Type Alias
Type Signature
type IsEditableAnnotationCallback = (annotation: AnnotationsUnion) => boolean

Example

Only allow the modification of annotations from the same author

NutrientViewer.load({
isEditableAnnotation: function(annotation) {
return annotation.creatorName === myCurrentUser.name;
},
});

Type Declaration

Parameters

The annotation.

Returns

boolean