- Disable touch callout on iOS webkit-based browsers (#1155).
- Fix an issue where some CSS styles were incompatible with old browsers.
- Add
rounded
option to thegetCroppedCanvas
method (#1047).
- Add
backface-visibility: hidden
to cropper image to avoid ghost lines when moving (#982). - Remove useless
cropper-hide
class from cropper image. - Check whether the parent node exists or not before removing the cropper container.
- Fix the cropper responsive when only the height was changed (#835).
- Fix TypeScript declarations compatibility (#799).
- Explicitly set the XMLHttpRequest request to be asynchronous (#682).
- Improve TypeScript declarations (#791).
- Fix the issue that cannot zoom out on touch devices (#726).
- Add TypeScript declarations for the events.
- Fix the issue when the value of the
minContainerWidth/Height
options is0
(#683). - Reset the initial canvas size when the
minCanvasWidth/Height
options is set (#725). - Store the initial image data in the right place for avoiding side-effect.
- Improve container resizing (#636).
- Improve touch device detection (#614).
- Improve event type determining for iOS 13+ (#571).
- Clone the image's
crossOrigin
attribute always even though thecheckCrossOrigin
is set tofalse
(#535). - Improve browser environment detecting (#554).
- Avoid removing the events of the original image.
- Avoid requesting any Data URLs by XMLHttpRequest for better performance (#526).
- Add an
alt
attribute to all internal images for better accessibility (#548). - Transform
enum
s totype
s from the definition files for TypeScript (#550).
- Compute the size of the image for all browsers that use WebKit as the layout engine in iOS devices, such as Safari and in-app browsers (#544).
- Always add a timestamp to the URL of a cross-origin image (#519).
- Revert the minimum container width from
300
to200
. - Revert the minimum container height from
150
to100
.
- Add
passive: false
andcapture: true
to the wheel event for better performance. - Improve touch event binding.
- Ignore the pointer events that were not triggered by the primary button.
- Fix typed array spreading error in IE or Safari 9.
- Fix the RegExp for the Safari browser detecting to ignore Chrome (#478).
- Ignore range error when the image does not have correct Exif information
- Read the Orientation value only when it is a JPEG image.
- Improve cropper instance storage to avoid side-effect (#394).
- Fix parameter error of
Object.assign
in iOS devices (#432). - Improve the TypedArray loop for better performance (#435).
- Not to restrict the canvas position when it is not cropped.
- Fix the wrong crop box size in view modes 1 and 2 (#381).
- Added 1 new option:
initialAspectRatio
. - Improve the smoothness of crop box resizing.
- Check the Orientation value only when both the
rotatable
andscalable
options are set totrue
. - If rounding causes the right or bottom border to increase by 1px, we should round the upper left corner and the size (#343).
- Ensure the cloned image loads completely before triggering the
ready
event to avoid side effects (#303). - Add namespace to data attribute names (from
data-*
todata-cropper-*
) to avoid side-effect (#319).
- Compute destination sizes with the image's aspect ratio when drawing an image (#326).
- Improve event binding.
- Add the missing
pivot
definition to thezoomTo
method (#320)
- Fix the bug of cropping images that have Orientation values (#313).
- Add missing
width
andheight
definitions (#302). - Fix incorrect behavior of
viewMode: 2
(#304). - Fix the bug of multiple starts (#306).
- Remove the
browser
field from thepackage.json
file (#307).
- Add type definition files for TypeScript.
- Enhance the
preview
option to supportArray
andNodeList
. - Fix incorrect cropped canvas sizes when providing the max/min sizes.
- Fix incorrect image natural sizes in iOS Safari (#279).
- Add
style
field topackage.json
. - Fix size error when load SVG image (#256).
- Allow set the pivot of zoom (#144).
- Fixed a bug of rotation (#260).
- Fixed a bug of rendering when disabled one of the
rotatable
andscalable
options (#241).
- Normalize related decimal numbers when cropping an image with canvas.
- Supports to load in node environment (#237).
- Fixed a bug of event binding (#238).
- Added 4 new options to
getCroppedCanvas
method:minWidth
,minHeight
,maxWidth
, andmaxHeight
. - Enhanced image scaling: the
scaleX
andscaleY
values should only be1
or-1
before, but now they can be any numbers. - Improved crop box resizing behavior in the northeast, northwest, southeast, and southwest directions. (#222).
- Fix the issue of zoom-out after clearing the crop box in view modes 1, 2, and 3 (#209).
- Improve crop box resizing behavior in the east, west, south, and north directions (#222).
- Added two new options (
imageSmoothingEnabled
andimageSmoothingQuality
) togetCroppedCanvas
method. - Fixed a bug of RegExp using (#195 by @arusakov).
- Fixed the issue of canvas box initialization (#179).
- Change the
main
field value fromdist/cropper.js
(UMD) todist/cropper.common.js
(CommonJS). - Added
module
andbrowser
fields topackage.json
.
- Fixed the bug of touch zoom (#161).
- Fixed the bug of window resize (#162).
- Improve the
toggleDragModeOnDblclick
option (only available when thedragMode
option is set tocrop
ormove
)
- Fixed the bug of rotating square image lead image shrink (#155).
- Improved RegExps for DataURL processing (#156).
- Use CSS3 2D Transforms instead of
left
andtop
for better performance (#138). - Set
withCredentials
attribute when read the image data by XMLHttpRequest (#141).
- Supports setting an element for preview (#113).
- Improved event handler for Pointer Events (#127).
- Built JavaScript with Rollup.
- Build CSS with PostCSS.
- Fixed a bug of auto-crop when replacing the image (#83).
- Fixed the bug of cropping (#80).
- Fixed the bug of triggering the
ready
event twice when calling thereplace
method (#81). - Fixed the bug of
getCroppedCanvas
when setscalable
orrotatable
tofalse
(#82).
- Removed
build
event. - Renamed
built
event toready
. - Fixed the error of Orientation transform.
- Ported code to ECMAScript 6.
- Fixed a bug of
data-*
attributes setting and getting. - Fixed the calling order of
scale
androtate
.
- Improved the rotate and scale transform behavior.
- Improved the
getCroppedCanvas
method (returns the whole canvas if it is not cropped). - Check the cross-origin setting when loading an image by XMLHTTPRequest.
- Supports 7 custom events:
build
,built
,cropstart
,cropmove
,cropend
,crop
, andzoom
. - The original callback options become shortcuts to these events now.
- IE8 is no longer supported after adding these custom events.
- Added a new parameter to the
replace
method for applying filters. - Improved the image initializing for Safari.
- Fixed incorrect size limitation of the crop box (#30).
- Fixed incorrect cropped canvas when scaleX or scaleY is great than 1.
- Fixed
crossOriginUrl
undefined error when exists thecrossOrigin
property. - Fixed the issue in the "destroy" method (#24).
- Optimized tests.
- Fixed a dimension bug in the "getCroppedCanvas" method.
- Added an example for cropping the round image.
- Supports zoom from the event triggering point.
- Limit wheel speed to prevent zooming too fast (#21).
- Improve the
setCropBoxData
method (#22).
- Fix event handlers
- Handle Data URL (avoid using XMLHttpRequest to open a Data URL).
- Handle ajax error when loading ArrayBuffer.
- Not to transform the image to base64 when Orientation equals
1
. - Fix some typos.
- Added a new option:
checkOrientation
. - Added a timestamp to the URL of the preview image.
- Added a new option:
restore
. - Fixed #12: Added vendor prefixes to CSS
transform
.
- Floor the numerical parameters for
CanvasRenderingContext2D.drawImage
.
- Fixed #10: improve new crop box creating.
- Fixed #7: reset the
crossOrigin
when calling thereplace
method.
- Supports four view modes.
- Supports three drag modes.
- Makes the crop box's borders and handlers visible when overflowing.
- Added some examples.
- Fixed some issues.
- Added
viewMode
- Added
dragMode
- Renamed
touchDragZoom
tozoomOnTouch
- Renamed
mouseWheelZoom
tozoomOnWheel
- Renamed
doubleClickToggle
totoggleDragModeOnDblclick
- Renamed
checkImageOrigin
tocheckCrossOrigin
- Removed
strict
(supported byviewMode: 1
) - Removed
dragCrop
(supported bydragMode: 'crop'
)
- Fix the error jQuery reference on the
setCanvasData
method. - Fix the typo on the
destroy
method.
- Added 5 new methods:
moveTo
,zoomTo
,rotateTo
,scaleX
andscaleY
. - Improved 4 methods:
move
,zoom
,rotate
andgetCanvasData
. - Improved cropping.
- Improved canvas limitation.
- Improved crop box limitation.
- Improved preview for the cross-origin images.
- Supports touch (mobile).
- Supports zoom.
- Supports rotation.
- Supports scale (flip).
- Supports canvas.
- Supports multiple croppers.
- Cross-browser support.
- Supports 37 options:
aspectRatio
,data
,preview
,strict
,responsive
,checkImageOrigin
,modal
,guides
,center
,highlight
,background
,autoCrop
,autoCropArea
,dragCrop
,movable
,rotatable
,scalable
,zoomable
,mouseWheelZoom
,wheelZoomRatio
,touchDragZoom
,cropBoxMovable
,cropBoxResizable
,doubleClickToggle
,minCanvasWidth
,minCanvasHeight
,minCropBoxWidth
,minCropBoxHeight
,minContainerWidth
,minContainerHeight
,build
,built
,cropstart
,cropmove
,cropend
,crop
,zoom
. - Support 22 methods:
crop
,reset
,clear
,replace
,enable
,disable
,destroy
,move
,zoom
,rotate
,scale
,getData
,setData
,getContainerData
,getImageData
,getCanvasData
,setCanvasData
,getCropBoxData
,setCropBoxData
,getCroppedCanvas
,setAspectRatio
,setDragMode
.