Added API method to get current annotation editing state

This commit is contained in:
Rainer Simon 2021-08-12 14:04:16 +02:00
parent 198a66f6ed
commit 6f68fc63fd
1 changed files with 3 additions and 0 deletions

View File

@ -106,6 +106,9 @@ export default class Editor extends Component {
return meta;
}
getCurrentAnnotation = () =>
this.state.currentAnnotation.clone();
/** Shorthand **/
updateCurrentAnnotation = (diff, saveImmediately) => this.setState({
currentAnnotation: this.state.currentAnnotation.clone(diff)