Enable deletion of annotation range from endpoint
parent
e6bbf7fa4b
commit
475d369811
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue