Releases: recogito/recogito-js
Releases · recogito/recogito-js
Version 1.8.4
- Adds enhancements to the formatter (#95)
Integrates recent updates to latest recogito-client-core package.
- Text entry fields in the editor now block the Delete key-up event, so that the annotation doesn't get deleted while the user edits text
- Comment widget now supports a
disableReply
property that will hide the reply field, if there is already a comment (recogito/recogito-client-core#113) - Comment and tag widget now support a placeholder property for overriding the text input placeholder text. This is an additional shortcut over the
messages
init property - Adds
zh
locale
Version 1.8.2
Performance enhancement
- Replaces the (unncessarily) hand-crafted DOM walking code with a
NodeIterator
, improving rendering performance significantly. (PR #85)
Version 1.8.1
Behavior/API
- Added a
cancelSelected
event that is fired when the user hits the Cancel button, closing the editor
Version 1.8.0
Bugfixes
- Fixed a style regression bug that prevented line breaks is read-only comments
- It's not possible to make the root of the page annotate-able (#69) - this is a breaking change!
Behavior/feature additions
- Added Chinese and Japanese UI translations
- Widgets can now add additional namespaces to the annotation
@context
. - Annotation Editor now needs to be closed explicitly (by clicking Cancel or Ok) if the user has made any changes to the annotation. Click outside will no longer cancel editing.
- When using Recogito to annotate content inside an iframe, the Editor auto-position now respects the iframe dimensions
Version 1.7.1
Behavior/feature additions
- Line breaks in comments are now properly displayed in read-only mode
- The default editor width is now reduced responsively on small-screen devices
widgets
anddisableEditor
are now available as instance fields that can be mutated at runtime- Added Russian UI translation
- Added support for annotating text inside iframes
API
- Breaking change: tag bodies are now serialized differently when terms are from a semantic vocabulary (label + URI) (#94):
{
"type": "SpecificResource",
"purpose": "tagging",
"source": {
"id": "http://vocab.getty.edu/aat/300010358",
"label": "material"
}
}
Non-semantic terms are still represented in the same way, as a TextualBody
with a value
:
{
"type": "TextualBody",
"value": "material",
"purpose": "tagging",
"source": "http://vocab.getty.edu/aat/300010358"
}
Bugfixes
- Relationship annotation: fixes a regression that caused an error when confirming the relationship tag with the 'Ok' button (instead of hitting the Enter key) (#56)
- Fixes a bug in readOnly mode that caused a text selection to be cleared when right-clicking. (Thus making it impossible to copy text with right mouse click.) (#60)
- Bugfixes to support annotations that have only TextPositionSelectors, but no TextQuoteSelectors (#58)
Version 1.6.1
Behavior/feature additions
- Read-only mode can now be changed without re-initializing RecogitoJS (#54), through the
.readOnly
instance property. E.g.:
r.readOnly = !r.readOnly;
- Added
disableSelect
instance field to (temporarily) disable selection - Addes
allowEmpty
init property
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, reducing bundle size by ~20kB
Version 1.5.4
Feature additions/behavior
- Added Thai UI translation
- Editor surfaces no longer show a
move
cursor - Cosmetic tweaks to editor auto-position behavior to avoid the jump when dragging the editor from the upwards-oriented position.
- Comment widget: the purpose selection dropdown is no longer obscured by tags
- New
selectAnnotation(arg)
API method that takes an annotation object or ID as an argument, and opens the popup for the given annotation. If no argument is supplied, any existing selection will be closed.
Version 1.5.3
Bugfixes
- Fixes a regression that caused the Relations Editor popup to break
Version 1.5.2
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
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);
Other
- Replaced deprecated @babel/polyfill