- 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();
});