ReferenceOnWidgetAnnotationCreationStartCallback
Type Alias OnWidgetAnnotationCreationStartCallback
Type Alias
Type Signature
type OnWidgetAnnotationCreationStartCallback = (
annotation: NutrientViewer.Annotations.WidgetAnnotation,
formField: NutrientViewer.FormFields.FormField,
) => {
annotation?: NutrientViewer.Annotations.WidgetAnnotation;
formField?: NutrientViewer.FormFields.FormField;
}
annotation: NutrientViewer.Annotations.WidgetAnnotation,
formField: NutrientViewer.FormFields.FormField,
) => {
annotation?: NutrientViewer.Annotations.WidgetAnnotation;
formField?: NutrientViewer.FormFields.FormField;
}
Example
Set the opacity of all widget annotations.
NutrientViewer.load({
onWidgetAnnotationCreationStart: (annotation, formField) => {
return { annotation: annotation.set('opacity', 0.7) };
}
// ...
});
Type Declaration
Parameters
annotationNutrientViewer.Annotations.WidgetAnnotation
The widget annotation that is about to be created.
formFieldNutrientViewer.FormFields.FormField
The original form field that is associated with the widget annotation.
You can programmatically modify the properties of the widget annotation and the associated form field just before it is created via the form creator UI.