Browse Source

Merge pull request #44 from BrambleXu/master

solve issue #43 for long selected text and delete button margin
pull/47/head
Hiroki Nakayama 6 years ago
committed by GitHub
parent
commit
c917f2b324
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 9 deletions
  1. 2
      app/server/static/bundle/sequence_labeling.js
  2. 5
      app/server/static/css/annotation.css
  3. 9
      app/server/static/css/forum.css
  4. 3
      app/server/static/js/sequence_labeling.js
  5. 2
      app/server/templates/admin/label.html

2
app/server/static/bundle/sequence_labeling.js
File diff suppressed because it is too large
View File

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

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

9
app/server/static/css/forum.css

@ -447,12 +447,9 @@ p {
padding-bottom: 0.75rem;
}
.mrrem025 {
margin-right: 0.25rem;
}
.mlrem-0375 {
margin-left:-.375rem;
.tweaked-margin {
margin-left: -0.4rem !important;
margin-right: 0.3rem !important;
}
/* Margin Auto */

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

@ -8,7 +8,8 @@ Vue.use(require('vue-shortkey'), {
Vue.component('annotator', {
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-bind:class="{tag: id2label[r.label].text_color}"\
v-bind:style="{ color: id2label[r.label].text_color, backgroundColor: id2label[r.label].background_color }"\

2
app/server/templates/admin/label.html

@ -21,7 +21,7 @@
<div class="control" v-for="label in labels">
<div class="tags has-addons">
<span class="tag is-medium" v-bind:style="{ color: label.text_color, 'background-color': label.background_color }">
<button class="delete is-small mrrem025 mlrem-0375" @click="removeLabel(label)"></button>
<button class="delete is-small tweaked-margin" @click="removeLabel(label)"></button>
[[ label.text ]]
</span>
<span class="tag is-medium">[[ label.shortcut ]]</span>

Loading…
Cancel
Save