Skip to content

v2.2.0

Latest

Choose a tag to compare

@github-actions github-actions released this 13 Jun 17:41

Breaking Changes

  • Require editorObjectKind metadata on every editor-owned Fabric object.
  • Make isMaskObject() strict: masks now require editorObjectKind: 'mask', maskId, maskUid, and maskName.
  • Make MaskObject.maskUid required.
  • Stop migrating legacy serialized states that do not include editorObjectKind.
  • Rename export option mergeMask to mergeMasks.
  • Rename constructor default mergeMaskByDefault to mergeMasksByDefault.

Added

  • Add public editor object guards for base images, masks, annotations, text annotations, draw annotations, session objects, and editable overlays.
  • Add Text annotations with runtime text config, direct creation, Text mode, editing cleanup, annotation list rendering, hidden/locked state, and update/delete APIs.
  • Add Draw mode with runtime brush config and one annotation object per created Fabric path.
  • Add mergeAnnotations(), annotation callbacks, annotation DOM bindings, keyboard cleanup, selected-object deletion, and layer operation APIs.
  • Add centralized layer ordering for base image, editable overlays, and session objects.
  • Add shared overlay merge transactions so mergeMasks() preserves annotations and mergeAnnotations() preserves masks.

Changed

  • Export options now use independent mergeMasks and mergeAnnotations flags that affect rendered output only.
  • Serializer snapshots now preserve base/mask/annotation metadata, active mask or annotation identity, and filter session objects.
  • Update docs demo for Text, Draw, annotation controls, layer controls, export toggles, and merge annotations.

Fixed

  • Update Text and Draw mode style inputs so changing text size or draw brush size while the mode remains active affects the next created annotation without re-entering the mode, and active inputs are not overwritten while the user is typing or dragging.
  • Let downloadImage() accept mergeMasks and mergeAnnotations options, and update the docs demo Download button to respect the same export overlay checkboxes as Base64 output.
  • Align image-load annotation counter handling with the required LoadImageContext contract, including reset and rollback paths.
  • Create export offscreen canvases from the Fabric canvas owner document for partial-edge sealing, JPEG compositing, and data URL re-encoding.
  • Release the Mosaic raster cache when exiting Mosaic mode.
  • Type Mosaic preview dash arrays as readonly and copy them before passing them to Fabric.