Added hasChanges method to Editor
This commit is contained in:
parent
03e4fd045b
commit
7cd17cc8ca
|
@ -122,6 +122,9 @@ export default class Editor extends Component {
|
||||||
getCurrentAnnotation = () =>
|
getCurrentAnnotation = () =>
|
||||||
this.state.currentAnnotation.clone();
|
this.state.currentAnnotation.clone();
|
||||||
|
|
||||||
|
hasChanges = () =>
|
||||||
|
this.props.annotation?.isEqual(this.state.currentAnnotation);
|
||||||
|
|
||||||
/** Shorthand **/
|
/** Shorthand **/
|
||||||
updateCurrentAnnotation = (diff, saveImmediately) => this.setState({
|
updateCurrentAnnotation = (diff, saveImmediately) => this.setState({
|
||||||
currentAnnotation: this.state.currentAnnotation.clone(diff)
|
currentAnnotation: this.state.currentAnnotation.clone(diff)
|
||||||
|
|
Loading…
Reference in New Issue