Skip to content

Version 2.1.0

Compare
Choose a tag to compare
@rsimon rsimon released this 22 Sep 17:30

This is a minor version upgrade which introduces a number of backwards compatible bugfixes and additions, but also includes some minimal changes to how Annotorious is configured.

Important: CSS styles are no longer embedded in the JavaScript file, but now have to be imported separately:

<link rel="annotorious.min.css" href="styles.css">

Important: editor widgets are becoming more flexible. This release is the first to include beta support for a plugin API.
As a consequence, this version introduces a minimal change to how the tag widget is configured with a controlled vocabulary.

// Previously
var anno = Annotorious.init({
  image: 'hallstatt',
  tagVocabulary: ['Animal', 'Building', 'Vegetation', 'Waterbody']
});

// From this version onwards
var anno = Annotorious.init({
  image: 'hallstatt',
  widgets: [
    'COMMENT',
    { widget: 'TAG', vocabulary: ['Animal', 'Building', 'Vegetation', 'Waterbody'] }
  ]
});

Further additions include:

  • Editor behavior
    • Comment text element & tag input element now extend to the full size of the parent, resolving the issue that
      clicking inside the widget sometimes didn't focus
    • Comment field now gets focus automatically after popup opens
  • Tag widget
    • Style bugfixes for IE11
    • When adding a tag, it's no longer required to press Enter to save it
  • Comment widget
    • The comment widget now has an additional editable config option so you can switch (separately from the global setting) between
      editable (editable: true), not editable (editable: false) and editable, but don't allow editing other users' contributions
      (editable: 'MINE_ONLY).
  • Rectangle selection
    • There is now an SVG mask element you can use to dim the area outside the selection while drawing
  • General
    • Added support for server-generated annotation IDs, using the same API as in RecogitoJS
    • Environment is no longer a global object, meaning that it is now safe to use multiple Recogito/Annotorious instances on the same page
    • All CSS classes are now properly prefixed to avoid clashes with other styles on the page (either with a9s for Annotorious-specific elements or r6o for elements imported from Recogito core)
    • Imports are now pulled from @recogito/annotorious/src for easier development