Nutrient Web SDK
    Preparing search index...

    Type Alias AnnotationToolbarItemsCallback

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

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

    For more information, see Configuration.annotationToolbarItems

    Type Declaration

      • (
            annotation: AnnotationsUnion | null,
            options: {
                defaultAnnotationToolbarItems: BuiltInAnnotationToolbarItem[];
                hasDesktopLayout: boolean;
            },
        ): AnnotationToolbarItem[]
      • Parameters

        • annotation: AnnotationsUnion | 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: {
              defaultAnnotationToolbarItems: BuiltInAnnotationToolbarItem[];
              hasDesktopLayout: boolean;
          }

          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 AnnotationToolbarItem[]