Nutrient Web SDK

ReferenceAnnotationResizeStartCallback

Type Alias AnnotationResizeStartCallback

This callback is called whenever an annotation is about to be resized. You can use it to control resize behavior.

Type Alias
Type Signature
type AnnotationResizeStartCallback = (
    event: AnnotationsResizeEvent,
) =>
    | {
        maintainAspectRatio?: boolean;
        maxHeight?: number;
        maxWidth?: number;
        minHeight?: number;
        minWidth?: number;
    }
    | undefined

Type Declaration

Parameters

The event containing information regarding the resizing of the annotation

Returns

{ … } | undefined

The configuration of the resize behavior or undefined for default behavior.

  • {
        maintainAspectRatio?: boolean;
        maxHeight?: number;
        maxWidth?: number;
        minHeight?: number;
        minWidth?: number;
    }
    • Optional
      maintainAspectRatio?: boolean

      Set to true to keep aspect ratio while resizing.

    • Optional
      maxHeight?: number

      Maximum height of the annotation while resizing.

    • Optional
      maxWidth?: number

      Maximum width of the annotation while resizing.

    • Optional
      minHeight?: number

      Minimum height of the annotation while resizing.

    • Optional
      minWidth?: number

      Minimum width of the annotation while resizing.

  • undefined