Added missing events for relation CRUD ops

This commit is contained in:
Rainer Simon 2020-04-28 11:10:00 +02:00
parent ae600be902
commit cb5f867b14
1 changed files with 6 additions and 0 deletions

View File

@ -129,12 +129,18 @@ export default class TextAnnotator extends Component {
onCreateOrUpdateRelation = (relation, previous) => {
this.relationsLayer.addOrUpdateRelation(relation, previous);
this.closeRelationsEditor();
if (previous)
this.props.onAnnotationUpdated(relation, previous);
else
this.props.onAnnotationCreated(relation, previous);
}
/** 'Delete' on the relation editor popup **/
onDeleteRelation = relation => {
this.relationsLayer.removeRelation(relation);
this.closeRelationsEditor();
this.props.onAnnotationDeleted(relation);
}
/****************/