Pages
mint-ui
Search
Basic information
Entities
Versions
Dependencies
mint-color
0.9.0 <= v < 1.0.0
Ui.ImageCrop
A simple image cropping component.
States
{
originalHeight: 0,
originalWidth: 0,
currentHeight: 0,
currentWidth: 0,
left: 0,
top: 0
}
A state to hold the dimensions of the image.
The status.
Properties
Whether or not to embed the panel (removes border and padding).
The change
event handler.
Called when the position and size is updated.
The size of the component.
{
source: "",
height: 0.5,
width: 0.5,
x: 0.25,
y: 0.25
}
The value (crop data).
Functions
calculateAxis
(
direction
:
Ui.ImageCrop.Direction
startPosition
:
Number
startSize
:
Number
distance
:
Number
)
Calculates the next position and size based on a direction for an axis.
Handles the keydown event.
Handles the move event.
Renders the component.
Starts the drag.
Updates the position of the image.
Handles the up event.