Nutrient Web SDK

ReferenceAnnotationToolbarItemsCallback

Type Alias AnnotationToolbarItemsCallback

This callback can be run on individual annotation toolbars to modify their toolbar items.

For more information, see Configuration.annotationToolbarItems

Type Alias
Type Signature
type AnnotationToolbarItemsCallback = (
    annotation: AnnotationsUnion | null,
    options: {
        defaultAnnotationToolbarItems: BuiltInAnnotationToolbarItem[];
        hasDesktopLayout: boolean;
    },
) => AnnotationToolbarItem[]

Type Declaration

Parameters

annotationAnnotationsUnion | null

The annotation that is going to be created or is currently selected. In case the annotation is not yet created, pageIndex is null. In case of items for annotation toolbars used in interaction modes like NutrientViewer.InteractionMode.INK_ERASER, annotation is null.

options
{ … }

The object that can be helpful in implementing custom toolbar.

  • defaultAnnotationToolbarItems: BuiltInAnnotationToolbarItem[]

    The list of default items that are shown for this particular annotation.

  • hasDesktopLayout: boolean

    Whether the screen is in desktop layout.

Returns