|
@ -170,6 +170,11 @@ export default { |
|
|
methods: { |
|
|
methods: { |
|
|
deleteEntity(annotationId) { |
|
|
deleteEntity(annotationId) { |
|
|
this.currentDoc.annotations = this.currentDoc.annotations.filter(item => item.id !== annotationId) |
|
|
this.currentDoc.annotations = this.currentDoc.annotations.filter(item => item.id !== annotationId) |
|
|
|
|
|
this.relations.forEach((r) => { |
|
|
|
|
|
if (r.fromId === annotationId || r.toId === annotationId) { |
|
|
|
|
|
this.deleteRelation(r.id) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
}, |
|
|
}, |
|
|
updateEntity(annotationId, labelId) { |
|
|
updateEntity(annotationId, labelId) { |
|
|
const index = this.currentDoc.annotations.findIndex(item => item.id === annotationId) |
|
|
const index = this.currentDoc.annotations.findIndex(item => item.id === annotationId) |
|
|