# Rectangle Stencil
# Props
# aspectRatio
Type:
NumberDetails:
Define the fixed aspect ratio of the crop box. By default, the crop box is free ratio.
# minAspectRatio
Type:
NumberDetails:
Define the minimum aspect ratio of the crop box. By default, the crop box is free ratio.
# maxAspectRatio
Type:
NumberDetails:
Define the maximum aspect ratio of the crop box. By default, the crop box is free ratio.
# class
Type:
StringDetails:
The class for the entire stencil.
# movingClass
Type:
StringDetails:
The class that applies to the entire stencil, when user moves it.
# resizingClass
Type:
StringDetails:
The class that applies to the entire stencil, when user resizes it.
# previewClass
Type:
StringDetails:
The class for the preview component.
# boundingBoxClass
Type:
StringDetails:
The class for the bounding box component. Probably you don't need to use it.
# handlerComponent
Type:
ComponentDefault:
SimpleHandlerDetails:
The handler component. For globally registered component just pass their name here, otherwise pass the component’s options object.
# handlers
Type:
ObjectDetails:
The object of handlers that should be visible or hidden.
For example if you pass the following object to the current prop, only handlers at corners will be visible
{ eastNorth: true, north: false, westNorth: true, west: false, westSouth: true, south: false, eastSouth: true, east: false, }
# handlersClasses
Type:
ObjectDetails:
The object of custom handler classes.
All available class names are listed below
{ default: 'handler', hover: 'handler--hover', eastNorth: 'handler--east-north', north: 'handler--north', westNorth: 'handler--west-north', west: 'handler--west', westSouth: 'handler--west-south', south: 'handler--south', eastSouth: 'handler--east-south', east: 'handler--ease', }
# handlersWrappersClasses
Type:
ObjectDetails:
The object of custom handler wrapper classes.
All available class names are listed below
{ default: 'handler-wrapper', hover: 'handler-wrapper--hover', eastNorth: 'handler-wrapper--east-north', north: 'handler-wrapper--north', westNorth: 'handler-wrapper--west-north', west: 'handler-wrapper--west', westSouth: 'handler-wrapper--west-south', south: 'handler-wrapper--south', eastSouth: 'handler-wrapper--east-south', east: 'handler-wrapper--ease', }
# lineComponent
Type:
ComponentDefault:
SimpleLineDetails:
The line component. For globally registered component just pass their name here, otherwise pass the component’s options object.
# lines
Type:
ObjectDetails:
The object of lines that should be visible or hidden.
For example if you pass the following object to the current prop, only top and bottom lines will be visible
{ north: true, west: false, south: true, east: false, }
# linesClasses
Type:
ObjectDetails:
The object of custom lines classes.
All available class names are listed below
{ default: 'line', hover: 'line--hover', north: 'line--north', west: 'line--west', south: 'line--south', east: 'line--ease', }
# linesWrappersClasses
Type:
ObjectDetails:
The object of custom lines wrapper classes.
All available class names are listed below
{ default: 'line-wrapper', hover: 'line-wrapper--hover', north: 'line-wrapper--north', west: 'line-wrapper--west', south: 'line-wrapper--south', east: 'line-wrapper--ease', }
# Service props
Remember!
You should not pass this props to stencil, they are passed by cropper itself
# image
Type:
ObjectDetails:
The object with information about the image:
{ src, width, height, transforms, loaded }
# stencilCoordinates
Type:
ObjectDetails:
It's the object with
left,right,heightandwidthfields, that represents desirable coordinates of stencil relative to visible area. In almost all cases you may use it as default coordinates for your absolute positioned stencil.
# transitions
Type:
BooleanDetails:
It's the flag that indicates that transitions is allowed right now.