Skip to content

Version 2.4.0

Compare
Choose a tag to compare
@rsimon rsimon released this 22 May 06:41
· 321 commits to main since this release

Feature extensions

  • New init option handleRadius, for setting the radius of the resize handles
  • New init option messages to override UI labels when initializing
  • Escape key now cancels editing (annotorious/annotorious#68)
  • Formatters now support insertion of DOM elements into the annotation SVG group (annotorious/annotorious#104)
  • Added support for React editor widgets

Behavior improvements/fixes

  • Improved auto-positioning of the editor, so that it now remains inside the viewport in (almost) all situations
  • Shapes are now constrained to the image area (when editing a shape, it's no longer possible to push it outside the image, issue #109)
  • When resizing a rectangle selection, it is now possible to move the dragged handle into neighbour quadrants without creating a zero-size rectangle (annotorious/annotorious#103)
  • anno.cancelSelected() now stops drawing if a tool is currently active (issue #51)

Bugfixes

  • Annotations now sorted by size on init, so that larger annotations no longer cover smaller ones initially
  • Fixed polygon area computation (annotorious/annotorious#105) - larger polygons no longer cover smaller rectangles
  • Fixed polygon serialization syntax, which was working in most browser, but technically not compliant to the SVG spec (annotorious/annotorious#115)
  • Fixed broken/missing setVisible API implementation (issue #46)

Other

  • Removed axios dependency in .loadAnnotations in favor of standard fetch API, reducing uncompressed download size by ~12kB
  • SVG selectors now go through basic security sanitization: removes <script> tags an on... event handlers (annotorious/annotorious#32)
  • Added most recently available dependency security patches