6
0
Эх сурвалжийг харах

Merge branch '60-select-correct-current-label-for-bounding-boxes' into 'master'

Resolve "select correct current label for bounding boxes"

Closes #60

See merge request troebs/pycs!53
Eric Tröbs 4 жил өмнө
parent
commit
45c06989f0

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

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