Browse Source

iss43: add tagged-text class in js and css

pull/44/head
Bramble Xu 6 years ago
parent
commit
cb206dfd40
2 changed files with 7 additions and 1 deletions
  1. 5
      app/server/static/css/annotation.css
  2. 3
      app/server/static/js/sequence_labeling.js

5
app/server/static/css/annotation.css

@ -150,6 +150,11 @@ body {
white-space: pre-wrap; white-space: pre-wrap;
} }
.content .tagged-text {
white-space: unset;
height: auto;
}
:focus { :focus {
outline: 0; outline: 0;
} }

3
app/server/static/js/sequence_labeling.js

@ -8,7 +8,8 @@ Vue.use(require('vue-shortkey'), {
Vue.component('annotator', { Vue.component('annotator', {
template: '<div @click="setSelectedRange">\ template: '<div @click="setSelectedRange">\
<span v-for="r in chunks"\
<span class="tagged-text"\
v-for="r in chunks"\
v-if="id2label[r.label]"\ v-if="id2label[r.label]"\
v-bind:class="{tag: id2label[r.label].text_color}"\ v-bind:class="{tag: id2label[r.label].text_color}"\
v-bind:style="{ color: id2label[r.label].text_color, backgroundColor: id2label[r.label].background_color }"\ v-bind:style="{ color: id2label[r.label].text_color, backgroundColor: id2label[r.label].background_color }"\

Loading…
Cancel
Save