Enable deletion of annotation range from endpoint

pull/10616/head
Alex P 2018-01-31 12:07:23 -08:00
parent e6bbf7fa4b
commit 475d369811
1 changed files with 9 additions and 1 deletions

View File

@ -135,7 +135,15 @@ class Annotation extends Component {
}
handleDeleteAnnotation = () => {
this.props.onDeleteAnnotation(this.props.annotation)
const {annotation, annotations, onDeleteAnnotation} = this.props
if (this.isEndpoint()) {
const startAnnotation = annotations.find(a => a.id === this.getStartID())
return onDeleteAnnotation(startAnnotation)
}
return onDeleteAnnotation(annotation)
}
render() {