Skip to content

Releases: annotorious/annotorious-openseadragon

Version 2.4.2

22 Jun 14:02
Compare
Choose a tag to compare

Features

  • Detachable editor: it's now possible to grab and drag the editor away from the annotation with mouse or touch, e.g. to avoid the editor getting in the way of shape resizing. The editor stays detached until closed.

Bugfixes

  • Fixes a bug that caused resize handes to be offset on Safari for responsive images, and on the OpenSeadragon plugin (#62)
  • Added a workaround that prevents touch navigation from breaking after a pinch/pan gesture was started on an annotation (#44)

Other

  • Internal changes to the plugin API to support drawing tools for different shape types
  • Internal changes to support OpenSeadragon sequence mode (#52)
  • Switched to vite for the production build, reducing the bundle size by ~65kByte (#59)

Version 2.4.1

13 Jun 09:40
Compare
Choose a tag to compare

Feature extensions

  • Support for formatters that insert DOM elements, like e.g. the Shape Labels plugin
  • New startSelection event fired when the user starts drawing a shape (#58)
  • Editor now supports widgets built with Preact, and no longer breaks for widgets using React hooks

Bugfixes

  • .getAnnotations no longer causes an error when an annotation is currently selected (annotorious/annotorious#118)
  • Calling .setDrawingEnabled or .setDrawingTool in read-only mode no longer causes error (#55)
  • cancelSelected event is now fired properly when using the Escape key to cancel editing (annotorious/annotorious#122)
  • Fixed a bug that caused an error when selecting an annotation while a formatter function is configured (annotorious/annotorious#127)
  • Setting readOnly dynamically now works properly, even when the initial setting was readOnly: true (#56)
  • Formatter styles provided via { 'style': '<css string>' } are now applied correctly (annotorious/annotorious#112)
  • Additional fixes to the widget plugin API

Version 2.4.0

22 May 06:41
Compare
Choose a tag to compare

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

Version 2.3.1

05 Apr 08:00
Compare
Choose a tag to compare

Maintenance release

  • Adds CSS fixes to the style of the tag widget
  • Bugfix: calling .selectAnnotation triggered two selectAnnotation events, when it should trigger any at all - fixed
  • Fixed a bug that caused coordinates to shift when annotating images on scrolled-down on touch devices
  • Fixed various minor behavior bugs in touch mode
  • Fixed a bug that caused polygons to close in touch mode after ~500ms of idleness, even if the finger wasn't on the screen (intended behavior is tap-and-hold for ~500ms) - issue #100
  • Bugfix: when creating a new selection, attemptinga to modify the shape caused a 'cancel'. Newly created shapes can now be modified immediately
  • Editor now (finally) auto-positions correctly when moving it outside the browser viewport
  • When allowing empty annotations (allowEmpty: true config option), empty annotations get a delete button

Version 2.3.0

29 Mar 13:16
Compare
Choose a tag to compare
  • Enhanced browser compatibility: added additional polyfills
  • Bugfix: .fitBounds method no longer brakes on non-rectangle shapes (issue #36)
  • Delete Annotation button (finally!), with a mechanism that allows widget plugins to control whether delete is possible or not
  • Bugfix: .removeAnnotation now allows annotation object or annotation ID as argument (issue #37)
  • Added touch support (issue #34)
  • Lots of behaviour tweaks to headless mode (running Annotorious with disableEditor: true)
  • headless config option now deprecated. Use disableEditor instead (#95)
  • disableEditor can be changed without re-initializing Annotorious (#92). E.g.:
anno.disableEditor = !anno.disableEditor;
  • ReadOnly mode can now be changed without re-initializing Annotorious (#93), through the .readOnly property. E.g.:
anno.readOnly = !anno.readOnly;
  • allowEmpty config option, will cause Annotorious to keep annotations with no bodies
  • When changing the drawing tool, the current drawing tool is properly stopped in case drawing is currently ongoing

Version 2.2.3

18 Mar 14:08
Compare
Choose a tag to compare

Bugfix release. Changes nothing about the library, but corrects a bug in the build + package configuration that caused v2.2.2 from getting properly published on the NPM registry and JSDELIVR.

Version 2.2.2

18 Mar 09:12
Compare
Choose a tag to compare
  • Fixes a regression bug on readOnly mode (issue #2)
  • Annotations are now properly aligned with flipped images
  • Annotations now remain sorted by size, so that larger annotations no longer obstruct smaller annotations
  • Switched to Terser for code optimization, due to ongoing security issues with Uglify
  • Internal API changes to enable more powerful plugins
  • .addDrawingTool and .listDrawingTools API methods

Version 2.2.1

21 Feb 17:59
Compare
Choose a tag to compare
  • Fixed bug that would cause annotations to become offset when the OpenSeadragon container width < height.
  • Shape edit handles can now be customized via CSS transform: scale(...)
  • Editor
    • Fixed a minor bug concerning proper display of created/lastModified times
    • Greek UI language translation
  • Widget API
    • Widgets now get an updated annotation instance when the user changes the selection target (e.g. move/resize in Annotorious)
    • Added .onSetProperty method that allows widgets to attach top-level props the annotation

Version 2.2.0

03 Jan 09:15
Compare
Choose a tag to compare
  • Added Dutch UI translation
  • New API method clearAnnotations
  • New API method getSelected
  • New API method setVisible
  • Added cancelSelection event, when user hits 'cancel' on a newly created shape
  • Revised headless API
    • New API method saveSelected to save changes to an annotation programmatically
    • New API method cancelSelected to cancel programmatically
  • Removed support for applyTemplate API function in favor of new headless API. Example: to apply a tag automatically in headless mode, use the following code.
// Run Annotorious in headless mode, without editor popup
var anno = Annotorious.init({
  image: document.getElementById('my-image'),
  headless: true
});

// Whenever a new annotation is created by the user, we want to append this body
var templateBody = {
  type: 'TextualBody',
  value: 'My Tag',
  purpose: 'tagging'
};

// On select, update the selection with the body
anno.on('createSelection', function(selection) {
  selection.body = templateBody;
  anno.updateSelected(selection, true); // True saves immediately, otherwise use anno.saveSelected();
}); 

Version 2.1.4

26 Dec 13:37
Compare
Choose a tag to compare
  • Editor bugfixes
  • getSelectedImageSnippet API method