Releases: recogito/recogito-client-core
Releases · recogito/recogito-client-core
Version 1.4.2
Bugfix: eliminated dynamic I18N label imports, since this was causing problems with vite build.
Version 1.4.1
Build tweaks (attempting to salvage the vite build)
Version 1.4.0
- Build tweaks: marked I18N JSON files as not side-effect free (attempting to get them included by the vite build)
- Added a widget plugin option to force-load a widget as React widget
Version 1.3.4
Bugfixes
- Fixed a regression introduced when changing the editor from function to class component: editor now positioned correctly when a shape is panned/zoomed in OpenSeadragon
Version 1.3.3
Bugfixes
- Fixed a regression bug that caused vanilla JS widget plugins to break after v2.5.0 (#70)
Behavior improvements/fixes
- Internal changes to
setPosition
which should make editor positioning more robust in some edge cases (images resized with CSS transform).
Version 1.3.2
Bugfix release. Fixed a minor regression, following the refactoring of the Editor
class.
Version 1.3.1
Maintenance release
- Refactored polyfills, so that Annotorious & RecogitoJS can distribute them as a separate bundle
- Fixed a regression bug that caused the editor popup to appear at the wrong position in RecogitoJS on scrollable pages (#69)
Version 1.3.0
Editor plugin API
- The
Editor
was refactored from a React functional component to a class component. This allows attaching follow-up actions to state changes. (Reactthis.setState({...}, callback)
- which isn't available in functional components.) The use case for this are widget actions that modify the current annotation (add or remove bodies) and then save & close the editor immediately (#66). - The editor plugin API callback function
.onUpsertBody
now simplifies the use of single-body plugins (i.e. plugins like dropdowns or input fields, which only insert or replace a single body of a givenpurpose
).
// Replaces the first existing body of purpose 'my-purpose' or appends, if none
props.onUpsertBody({ value: 'Some value', purpose: 'my-purpose' });
- The widget API has a new callback
onBatchModify
which allows applying any combination of body modifications in one go (append, remove, update, upsert), with or without closing the editor immediately afterwards. (#65)
const changes = [
{ action: 'append', body: bodyToAppend },
{ action: 'update', previous: prevBody, updated: updatedBody }
{ action: 'remove', body: bodyToRemove },
// Normal upsert, previous is optional
{ action: 'upsert', previous: prevBody, updated: updatedBody }
// Auto-upsert based on purpose
{ action: 'upsert', body: bodyToUpser }
];
const saveImmediately = true;
args.onBatchModify(changes, saveImmediately);
Behavior improvements/fixes
- When the editor opens, the first widget in the list now automatically gets initial focus
Version 1.2.4
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.
Other
- Minor API change to the
Editor
to make it more explicit that widgets can be changed at runtime (#57 )
Version 1.2.3
Maintenance release - resolves more React plugin build issues