From e5fc2dbab7c6171e9ab596346519579d50a1cfbe Mon Sep 17 00:00:00 2001 From: Clemens Wolff Date: Tue, 16 Apr 2019 10:41:43 -0400 Subject: [PATCH] Fix incorrect sequence labeling annotation UI --- app/server/static/js/annotator.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/server/static/js/annotator.vue b/app/server/static/js/annotator.vue index f3fcb3f29b..d692182c64 100644 --- a/app/server/static/js/annotator.vue +++ b/app/server/static/js/annotator.vue @@ -7,7 +7,7 @@ color: id2label[r.label].text_color, \ backgroundColor: id2label[r.label].background_color \ }" - ) {{ [...text].slice(r.start_offset, r.end_offset).join('') }} + ) {{ textPart(r) }} button.delete.is-small(v-if="id2label[r.label].text_color", v-on:click="removeLabel(r)") @@ -139,6 +139,10 @@ export default { this.endOffset = 0; }, + textPart(r) { + return [...this.text].slice(r.start_offset, r.end_offset).join(''); + }, + addLabel(labelId) { if (this.validRange()) { const label = {