Skip to content

Commit

Permalink
Fix incorrect sequence labeling annotation UI
Browse files Browse the repository at this point in the history
  • Loading branch information
c-w committed Apr 16, 2019
1 parent af26d38 commit e5fc2db
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/server/static/js/annotator.vue
Expand Up @@ -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)")
</template>

Expand Down Expand Up @@ -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 = {
Expand Down

0 comments on commit e5fc2db

Please sign in to comment.