- 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).
- Alway 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 wheel event for better performance. - Improve touch event binding.
- Ignore the pointer events are 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 orientation 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 typed array loop for better performance (#435).
- Not to restrict the canvas position when it is not cropped.
- Fix wrong crop box size in view mode 1 and 2 (#381).
- Added 1 new option:
initialAspectRatio
. - Improve the smoothness of crop box resizing.
- Check orientation only when both the
rotatable
andscalable
options are set totrue
. - In case rounding off leads to extra 1px in right or bottom border we should round the top-left corner and the dimension (#343).
- Ensure the cloned image loads completely before trigger the
ready
event to avoid side effect (#303). - Add namespace to data attribute names (from
data-*
todata-cropper-*
) to avoid side effect (#319).
- Compute destination sizes with image's aspect ratio when draw image (#326).
- Improve event binding.
- Add missing
pivot
definition tozoomTo
method (#320)
- Fix the bug of cropping image with orientation (#313).
- Add missing
width
andheight
definitions (#302). - Fix incorrect behavior of
viewMode: 2
(#304). - Fix the bug of multiple starts (#306).
- Remove
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 max/min sizes provided.
- Fix incorrect image natural sizes in iOS Safari (#279).
- Add
style
field topackage.json
. - Fix size error when load SVG image (#256).
- Allow to set the pivot of zoom (#144).
- Fixed a bug of rotation (#260).
- Fixed a bug of render when disable one of
rotatable
andscalable
options (#241).
- Normalize related decimal numbers when crop 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).
- Fixed a bug of zoom out after cleared the crop box in view mode 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 rotate 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 to set 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 replace the image (#83).
- Fixed the bug of cropping (#80).
- Fixed the bug of calling
ready
event twice when callreplace
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 cross origin setting when load image by XMLHTTPRequest.
- Supports 7 custom events:
build
,built
,cropstart
,cropmove
,cropend
,crop
andzoom
. - The original callback options become shortcuts of these events now.
- IE8 is no longer supported after added 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 great than 1.
- Fixed crossOriginUrl undefined error when exists the
crossOrigin
property. - Fixed the issue in the "destroy" method (#24).
- Optimized tests.
- Fixed a dimension bug in the "getCroppedCanvas" method.
- Added an example for cropping round image.
- Supports to zoom from event triggering point.
- Limit wheel speed to prevent zoom too fast (#21)
- Improve the
setCropBoxData
method (#22)
- Fix event handlers
- Handle Data URL (avoid to use XMLHttpRequest to open a Data URL)
- Handle ajax error when load ArrayBuffer
- Not to transform the image to base64 when Orientation equals to
1
- Fix some typos
- Added a new option:
checkOrientation
- Added a timestamp to the url of 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 call thereplace
method
- Supports four view modes
- Supports three drag modes
- Makes the crop box's borders and handlers visible when overflow
- 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 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 cross origin image
- 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
.