Browse Source

Fix incorrect sequence labeling annotation UI

pull/159/head
Clemens Wolff 5 years ago
parent
commit
e5fc2dbab7
1 changed files with 5 additions and 1 deletions
  1. 6
      app/server/static/js/annotator.vue

6
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)")
</template>
@ -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 = {

Loading…
Cancel
Save