From a8340866d6c9d9eebea7ce7ba1618e1ad832ea5b Mon Sep 17 00:00:00 2001 From: Rainer Simon Date: Wed, 17 Feb 2021 17:15:23 +0100 Subject: [PATCH] Fixes https://github.com/recogito/recogito-js/issues/16 --- package-lock.json | 2 +- src/TextAnnotator.jsx | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 6a1455d..48f5f6d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@recogito/recogito-client-core", - "version": "0.3.3", + "version": "0.3.4", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/src/TextAnnotator.jsx b/src/TextAnnotator.jsx index 6abebd1..e145196 100644 --- a/src/TextAnnotator.jsx +++ b/src/TextAnnotator.jsx @@ -254,6 +254,8 @@ export default class TextAnnotator extends Component { } render() { + const readOnly = this.props.config.readOnly || this.state.selectedAnnotation?.readOnly + return ( <> { this.state.selectedAnnotation && @@ -261,6 +263,7 @@ export default class TextAnnotator extends Component { wrapperEl={this.props.wrapperEl} annotation={this.state.selectedAnnotation} selectedElement={this.state.selectedDOMElement} + readOnly={readOnly} config={this.props.config} env={this.props.env} onAnnotationCreated={this.onCreateOrUpdateAnnotation('onAnnotationCreated')}