diff --git a/src/editor/Editor.jsx b/src/editor/Editor.jsx index 8716557..864138a 100644 --- a/src/editor/Editor.jsx +++ b/src/editor/Editor.jsx @@ -122,6 +122,9 @@ export default class Editor extends Component { getCurrentAnnotation = () => this.state.currentAnnotation.clone(); + hasChanges = () => + this.props.annotation?.isEqual(this.state.currentAnnotation); + /** Shorthand **/ updateCurrentAnnotation = (diff, saveImmediately) => this.setState({ currentAnnotation: this.state.currentAnnotation.clone(diff)