Added onAnnotationSelected call

This commit is contained in:
Rainer Simon 2020-05-29 10:48:29 +02:00
parent 71f390b316
commit 3f4e6a85ec
1 changed files with 4 additions and 1 deletions

View File

@ -70,7 +70,10 @@ export default class TextAnnotator extends Component {
}, () => this.setState({ }, () => this.setState({
selectedAnnotation: selection, selectedAnnotation: selection,
selectedDOMElement: element selectedDOMElement: element
})) }));
if (!selection.isSelection)
this.props.onAnnotationSelected(selection.clone());
} else { } else {
this.clearState(); this.clearState();
} }