Releases: devtheorem/cropt
Releases · devtheorem/cropt
Cropt 1.2.2
Changed
bind()is now declaredasync(it already returned a Promise, so this does not affect usage).
Fixed
- Viewport was not reset to its configured dimensions when binding a new image without restoring saved state.
- Max zoom was incorrectly reduced when only one viewport dimension was resized.
Cropt 1.2.1
Changed
- Improved min/max zoom limits when the viewport is resized.
- Expanded readme with examples for binding from a file input and uploading the cropped image.
Cropt 1.2.0
Added
- Support for dragging at the same time as pinch zooming.
- CSS progress spinner while loading a bound image.
Changed
enableResizenow allows resizing both width and height simultaneously, with a minimum size so the viewport can always be dragged.- Improved zoom speed on touchpads.
- Optimized image dragging and centering for smoother rendering.
Fixed
- Laggy/jumpy pinch zooming in Firefox (caused by https://bugzil.la/1729465).
- Broken image icon appearing before an image was bound (#7).
Cropt 1.1.1
Added
enableResizeoption: when set totrue, resize handles are shown on the viewport edges allowing the user to adjust its size (#9).CroptStateinterface with fieldsx,y,zoom,width, andheightrepresenting a saved crop state.getState()method to retrieve the current crop state.bind()now accepts aCroptStateobject as its second argument to restore zoom, position, and viewport dimensions (#3, #10). Passing a number is still supported for backwards compatibility.
Changed
- Refreshed demo site to demonstrate the
enableResizeoption and saving/restoring crop state.
Note
Version 1.1.0 was skipped due to a bug with resize handle touchscreen behavior.
Cropt 1.0.2
Fixed
- Incorrect step value for range input.
Cropt 1.0.1
Cropt 1.0.0
Changed
- Replaced
viewport.typeoption withviewport.borderRadius. This option takes a string containing a CSS length or percentage, and defaults to"0px". To upgrade code that used the"circle"viewport type, instead set the border radius to"50%".
Cropt 0.9.1
Changed
- Removed unnecessary variables.
- Code is now formatted with Prettier.
Cropt 0.9.0
Fixed
- Cropt now clamps image drags to the viewport boundary, rather than ignoring the delta if it would go past the boundary. This fixes unexpected gaps between the image and viewport edges. (#5).
Cropt 0.8.9
Fixed
- Image content is no longer doubled when resizing a large image with transparency (#1).