Eric Tröbs 4 anni fa
parent
commit
a45aec76f5
1 ha cambiato i file con 4 aggiunte e 3 eliminazioni
  1. 4 3
      webui/src/components/media/annotation-box.vue

+ 4 - 3
webui/src/components/media/annotation-box.vue

@@ -7,7 +7,7 @@
 
     <div class="buttons">
       <template v-if="!immutable">
-        <div v-if="position.label" class="label-text">{{ currentLabel }}</div>
+        <div v-if="position.label" class="label-text">{{ currentLabel.name }}</div>
 
         <img v-if="confirmationButton"
              alt="confirm" src="@/assets/icons/check.svg"
@@ -31,7 +31,8 @@
 
       <option v-for="label in labelList"
               :key="label.id"
-              :value="label.id">
+              :value="label.id"
+              :selected="label === currentLabel">
         {{ label.name }}
       </option>
     </select>
@@ -76,7 +77,7 @@ export default {
       return Object.keys(this.labels).map(key => this.labels[key]);
     },
     currentLabel: function () {
-      return this.labels[this.position.label].name;
+      return this.labels[this.position.label];
     },
     style: function () {
       const left = this.image.left;