The jquery plug-in imgAreaSelect can easily crop portraits, images, or areas without flash. An important feature of imgAreaSelect is to drag and drop the mouse to obtain the cropping coordinates, in fact, the real implementation of cropping is still submitted to the server
The jquery plug-in imgAreaSelect can easily crop portraits, images, or areas without flash. An important feature of imgAreaSelect is to drag and drop the mouse to obtain the cropping coordinates, in fact, the actual implementation of cropping is still submitted to the server for processing.
JQuery imgAreaSelect DEMO: Http://www.phpddt.com/demo/imgareaselect/
Official jQuery imgAreaSelect website: Http://odyniec.net/projects/imgareaselect/
JQuery imgAreaSelect parameter Introduction:
AspectRatio: Set the display ratio of the selected area, for example, "4: 3"
If autoHide is set to true, it disappears when the selected region ends. The default value is false.
ClassPrefix: a string that indicates the class name prefix of the plug-in style. The default value is "imgareaselect"
Disable the plug-in if disable is set to true.
If enable is set to true, the plug-in is re-enabled.
If the value of fadeSpeed is set to a number greater than zero, the image is displayed with a graceful fade-in/fade-out animation. The default value is false.
If handles is set to true, the adjust handle is displayed in the selection area. If it is set to "corners", only the adjust handle is displayed. The default value is false.
If hide is set to true, select hidden range
ImageHeight: if scaled with the CSSwidthandheightproperties)
ImageWidth: True Image Width (if scaled with the CSSwidthandheightproperties)
If the instance is set to true, imgAreaSelect () calls to return an instance of the image bound to imgAreaSelect, so that you can use its API method
Enable/disable keyboard support for keys. The default value is false.
Maximum height (in pixels) selected by maxHeight)
Max width (in pixels)
Min height (in pixels)
Min width (in pixels)
Movable: determines whether the selection can be moved. The default value is true.
Parent: A jQuery object or a selection string that is appended to the parent element. The default value is "body"
If persistent is set to true, clicking outside the selection area will not start a new selection area (that is, the user will only be able to move/adjust the existing selection range), the default value is false
Resizable determines whether the selected area should be adjustable. The default value is true.
Show if set to true, the selection is displayed
X1
Y1 coordinates in the upper left corner of the selected area
X2
Y2 coordinates in the upper right corner of the area initially selected
The z-index value of the zIndex plug-in element. Normally, imgAreaSelect is automatically allocated. However, in a few cases, it is necessary to set it to a specified value.
Callback Function during onInit plug-in Initialization
The callback function when the onSelectStart plug-in starts to select
The callback function when the onSelectChange plug-in changes the selection.
JQuery imgAreaSelect instance:
Jquery plugin imgAreaSelect tutorial (http://www.phpddt.com)