I’ve finally released the latest version of the JavaScript Image Cropper UI which has been updated to version 1.2.0.
This adds quite a few bugs fixes, feature additions (the much requested ability to set maximum dimensions) and speed improvements and general streamlining.
NOTE: One really important change to note is that the cropper no longer has the default behaviour of automatically setting a ratio when both min width & height passed, the ratioDimensions must be now passed when this functionality is required.
Here’s a full list of all the changes:
- Added id to the preview image element using ‘imgCrop_[originalImageID]’
#00001
- Fixed bug: Doesn’t account for scroll offsets#00009
- Fixed bug: Placing the cropper inside differently positioned elements causes incorrect co-ordinates and display#00013
- Fixed bug: I-bar cursor appears on drag plane#00014
- Fixed bug: If ID for image tag is not found in document script throws error- Fixed bug with drag start co-ordinates if wrapper element has moved in browser (e.g. dragged to a new position)
- Fixed bug with drag start co-ordinates if image contained in a wrapper with scrolling - this may be buggy if image has other ancestors with scrolling applied (except the body)
- #00015 - Fixed bug: When cropper removed and then reapplied onEndCrop callback gets called multiple times, solution suggestion from Bill Smith
- Various speed increases & code cleanup which meant improved performance in Mac - which allowed removal of different overlay methods for IE and all other browsers, which led to a fix for:
#00010
- Fixed bug: Select area doesn’t adhere to image size when image resized using img attributes
#00006
- Removed default behaviour of automatically setting a ratio when both min width & height passed, the ratioDimensions must be passed in#00005
- Added ability to set maximum crop dimensions, if both min & max set as the same value then we’ll get a fixed cropper size on the axes as appropriate and the resize handles will not be displayed as appropriate- Switched keydown for keypress for moving select area with cursor keys (makes for nicer action) - doesn’t appear to work in Safari
Phew!
Actually all of this was pretty much wrapped up in the first couple of weeks of October, but being as anal as I am I didn’t want to remove a bug fix that I had in place and working perfectly in Firefox but which went crazy in IE and Opera (hence my last post). That fix was having some overflow
CSS properties on the wrapper around the image to which the cropper is applied to, the fix and test page worked perfectly if Firefox, but not in IE and Opera. The fix is still
in place, but the test page is not - I may re-address this in the future.
Finally as usual, please use the JavaScript Image Cropper UI code page to leave comments & bug reports etc. on the cropper UI.