Constructors
constructor
Parameters
element: HTMLImageElement
Optional options: Cropper.Options<HTMLImageElement>
Parameters
element: HTMLCanvasElement
Optional options: Cropper.Options<HTMLCanvasElement>
Methods
getCroppedCanvas
Parameters
Returns HTMLCanvasElement
getData
Parameters
Optional rounded: boolean
move
- move(offsetX: number, offsetY?: number): Cropper
Parameters
offsetX: number
Optional offsetY: number
moveTo
- moveTo(x: number, y?: number): Cropper
Parameters
x: number
Optional y: number
replace
- replace(url: string, onlyColorChanged?: boolean): Cropper
Parameters
url: string
Optional onlyColorChanged: boolean
scale
- scale(scaleX: number, scaleY?: number): Cropper
Parameters
scaleX: number
Optional scaleY: number
setAspectRatio
- setAspectRatio(aspectRatio: number): Cropper
zoomTo
- zoomTo(ratio: number, pivot?: { x: number; y: number }): Cropper
Parameters
ratio: number
Optional pivot: { x: number; y: number }