Class Cropper

Constructors

  • Creates a new cropper instance

    Parameters

    • board: Board

      The [[Board]]

    Returns Cropper

Accessors

  • get isActive(): boolean
  • Returns whether the cropper is active or not

    Returns boolean

Methods

  • Crops the selected area

    Parameters

    • options: Partial<BaseCropOptions & {
          callback?: ((str) => void);
          height?: number;
          mimeType?: string;
          pixelRatio?: number;
          quality?: number;
          width?: number;
          x?: number;
          y?: number;
      }> = {}

      The [[CropOptions | options]]

    Returns Promise<null | Point & Dimensions>

  • Returns the active cropper instance

    Returns FixedCircularCropper | FixedRectangleCropper | FlexibleCircularCropper | FlexibleRectangleCropper

  • Returns current rect of the cropper

    Returns null | Point & Dimensions

    left, top, width and height of the cropzone rect

  • Changes position of cropper zone

    Parameters

    • point: Point

      The [[Point]]

    Returns void

  • Starts the cropper

    Parameters

    Returns void

  • Stops the active cropper

    Returns void

  • Zooms on the board. It only works in fixed mode

    Parameters

    • value: number

      The zooming value

    Returns undefined | false