Skip to content

v1.3.0

Choose a tag to compare

@github-actions github-actions released this 21 May 16:51

Added

  • Add preferred public API names while keeping deprecated aliases until v2.0.0: resetImageTransform(), createMask(), mergeMasks(), and exportImageBase64().
  • Add exportImageFile() for direct File exports in JPEG, PNG, or WebP.
  • Add LoadImageOptions.preserveScroll for internal reload flows such as merge.
  • Add imageLoadTimeoutMs to prevent stalled image decode operations from hanging editor workflows.
  • Add GitHub Actions support for manually creating a vX.X.X tag and draft GitHub Release from main.

Changed

  • label.getText(mask, creationIndex) now receives a stable zero-based creation index (mask.maskId - 1) instead of a mutable current list position.
  • Normalize canvas growth behavior after image load across expandCanvasToImage, fitImageToCanvas, and coverImageToCanvas.
  • Refresh the docs demo into a compact tool-style workspace and use Fit Image as the default demo mode.
  • Add cache-busted docs asset URLs so browsers do not reuse stale demo CSS or scripts after an update.
  • Publish npm packages from the GitHub Release publication event so draft releases can be reviewed first.

Fixed

  • Fix Fit Image zoom behavior so zooming after load keeps the image inside resized scrollable canvas bounds instead of visually clipping it.
  • Fix Fit Image initial sizing so large demo viewports are not limited by the default configured canvas size.
  • Fix non-rect and custom mask behavior so rect, circle, ellipse, polygon, and fabricGenerator masks share hover, opacity restore, history, and canvas expansion behavior.
  • Fix polygon masks to support both { x, y } and [x, y] point formats.
  • Fix state restore after merge and undo by persisting editor metadata such as baseImageScale, currentScale, currentRotation, and maskCounter.
  • Fix demo file input handling so a selected file is loaded once with the current layout options.
  • Fix explicit image replacement in cover-canvas mode so scroll position resets, while merge reloads preserve the current scroll position.
  • Fix placeholder visibility updates when the placeholder exists but the canvas container reference is unavailable.
  • Fix crop resize constraints so crop.minWidth and crop.minHeight are enforced within the current image bounds.
  • Fix image resampling and crop export to fail clearly when a 2D canvas context cannot be created.
  • Fix animation queue draining and history queue cleanup to avoid avoidable promise-chain growth.
  • Cache scrollbar measurements and avoid temporary overflow mutations while reading viewport size.
  • Avoid removing and recreating selected mask labels during saveState().
  • Expand the canvas once for grouped mask edits instead of resizing once per mask.