Releases: recogito/recogito-client-core
Releases · recogito/recogito-client-core
Version 1.6.0
Features/behavior
- The tag widget now supports functions as vocabulary init option. The function will get the current value of the tag input field as an argument, and must return either, a list of vocabulary terms, e.g.:
// Return an array of strings to serve as suggestions
return ['Animal', 'Person', 'Building'];
// Or return a list of objects with label/uri fields
return [
{ label: 'Animal', uri: 'http//example.com/vocab/Animal' },
{ label: 'Person', uri: 'http//example.com/vocab/Person' },
{ label: 'Building', uri: 'http//example.com/vocab/Building' }
];
Or it must return a Promise of vocabulary items.
Bugfixes
- Fixes a bug that prevented language switching, from any of the supported languages back to the default
en
(annotorious/annotorious-openseadragon#104)
Other
- Removed downshift dependency in favour of a lighter (and more hackable) custom implementation
Version 1.5.4
- Added Thai translation
Version 1.5.3
Behavior
- Cosmetic tweaks to editor auto-position behavior to avoid the jump when dragging the editor from the upwards-oriented position.
- When the editor is configured as draggable, text comment fields are no longer drag surfaces. This way, it's possible to select (and copy) text from comment fields (#87)
- Comment widget: the purpose selection dropdown is no longer obscured by tags
Version 1.5.2
Widget API
- Breaking change!
onRemoveAndAppend
was dropped in favour of the more flexibleonBatchModify
. To upgrade, replace code like this:
const bodiesToRemove = [...];
const bodiesToAppend = [...];
const saveImmediately = true;
props.onRemoveAndAppend(bodiesToRemove, bodiesToAppend, saveImmediately);
with the following:
const changes = [
{ 'action': 'remove', body: bodyToRemove },
{ 'action': 'remove', body: anotherBodyToRemove },
{ 'action': 'append', body: bodyToAppend }
]);
props.onBatchModify(changes);
Behavior
- Cosmetic fixes to draggable surfaces: move cursor no longer shows on non-draggable surfaces + no more move cursor when editor is configured to fixed (=non-detachable) mode (#85)
Other
- Replaced deprecated
@babel/polyfill
(#86)
Version 1.4.8
Behavior
- The editor now repositions when the widgets change. This is to avoid mis-placement when the editor grows/shrinks (#82)
- The litte arrow on the editor now hides when the editor is pushed into the view, making things look a bit better (i.e. the arrow no longer points outside of the annotation)
- Draggable surfaces on the editor are now properly indicated with cursor
move
icon
Bugfix
- Fixed a regression that broke the Vite build (#83)
Version 1.4.7
Adds a mechanism for widget plugins to use built-in I18N features and register their own localized UI labels.
Version 1.4.6
Features
- Added Finnish and Korean UI translation
- Made editor component auto-position behavior optional (via a the
autoPosition
prop, defaults totrue
) - Added support for tagging vocabularies with ontology terms, where each vocabulary item consists of a label and a URI.
var r = Recogito.init({
content: 'content', // Element id or DOM node to attach to
widgets: [{
widget: 'TAG',
vocabulary: [
{ label: 'Place', uri: 'http://www.example.com/ontology/place' },
{ label: 'Person', uri: 'http://www.example.com/ontology/place' },
{ label: 'Event', uri: 'http://www.example.com/ontology/event' },
{ label: 'Organization', uri: 'http://www.example.com/ontology/organization' },
{ label: 'Animal', uri: 'http://www.example.com/ontology/animal' }
]
}]
});
It's also possible to mix normal terms and ontology terms.
var r = Recogito.init({
content: 'content', // Element id or DOM node to attach to
widgets: [{
widget: 'TAG',
vocabulary: [
{ label: 'Place', uri: 'http://www.example.com/ontology/place' },
'Person',
{ label: 'Event', uri: 'http://www.example.com/ontology/event' },
]
}]
});
Behavior/bugfixes
- Widget API:
saveImmediately
andonUpsertBody
now properly exposed to VanillaJS widgets
Version 1.4.5
Maintenance release
- Editor no longer resets when moved (regression, mostly relevant to Annotorious OpenSeadragon)
- Method .getSelected, to enable API access to current editor state
- Minor fixes to
draggable
behavior
Version 1.4.4
- Added French UI labels
Version 1.4.3
Extended widget API force
option to React
and PlainJS
.