Skip to content

Releases: devtheorem/cropt

Cropt 1.2.2

10 May 18:23

Choose a tag to compare

Changed

  • bind() is now declared async (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

08 May 23:20

Choose a tag to compare

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

07 May 22:39

Choose a tag to compare

Added

  • Support for dragging at the same time as pinch zooming.
  • CSS progress spinner while loading a bound image.

Changed

  • enableResize now 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

01 May 01:00

Choose a tag to compare

Added

  • enableResize option: when set to true, resize handles are shown on the viewport edges allowing the user to adjust its size (#9).
  • CroptState interface with fields x, y, zoom, width, and height representing a saved crop state.
  • getState() method to retrieve the current crop state.
  • bind() now accepts a CroptState object 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 enableResize option 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

16 Jan 17:34

Choose a tag to compare

Fixed

  • Incorrect step value for range input.

Cropt 1.0.1

14 Jan 00:01

Choose a tag to compare

Fixed

  • Janky zoom behavior caused by incorrect center point calculation (#6).
  • Zooming out all the way now works as expected with large images (#6).
  • Zoom limit now auto-updates when dynamically changing the viewport size.

Cropt 1.0.0

01 Dec 21:42

Choose a tag to compare

Changed

  • Replaced viewport.type option with viewport.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

07 Nov 16:51

Choose a tag to compare

Changed

  • Removed unnecessary variables.
  • Code is now formatted with Prettier.

Cropt 0.9.0

24 Oct 04:04

Choose a tag to compare

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

27 Jun 01:55

Choose a tag to compare

Fixed

  • Image content is no longer doubled when resizing a large image with transparency (#1).