6
0
Kaynağa Gözat

remove zoom view buttons

Eric Tröbs 3 yıl önce
ebeveyn
işleme
c1b6779885

+ 22 - 27
webui/src/components/media/annotated-image.vue

@@ -9,7 +9,7 @@
                    :label="label"
                    @label="label = $event"
                    :labels="labels"
-                   @infoBox="toggleInfoBox()"
+                   @infoBox="toggleInfoBox"
                    :zoomBox="zoomBox"
                    @unzoom="zoomBox=false; interaction=false"
                    @prevzoom="$refs.overlay.prevZoom()"
@@ -57,8 +57,7 @@
                      :width="300"
                      :margin="10"
                      :labels="labels"
-                     @closed="infoBoxClosed"
-                     />
+                     @closed="infoBoxClosed"/>
     </template>
   </div>
 </template>
@@ -93,13 +92,13 @@ export default {
 
     // get model
     this.$root.socket.get(`/projects/${this.$root.project.identifier}/model`)
-        .then(response => response.json())
-        .then(model => {
-          this.supported.labeledImages = model.supports.includes('labeled-images');
-          this.supported.labeledBoundingBoxes = model.supports.includes('labeled-bounding-boxes');
-          this.supported.boundingBoxes = this.supported.labeledBoundingBoxes
-              || model.supports.includes('bounding-boxes');
-        });
+      .then(response => response.json())
+      .then(model => {
+        this.supported.labeledImages = model.supports.includes('labeled-images');
+        this.supported.labeledBoundingBoxes = model.supports.includes('labeled-bounding-boxes');
+        this.supported.boundingBoxes = this.supported.labeledBoundingBoxes
+          || model.supports.includes('bounding-boxes');
+      });
   },
   destroyed: function () {
     window.removeEventListener('resize', this.resize);
@@ -184,8 +183,7 @@ export default {
     }
   },
   methods: {
-
-    toggleInfoBox: function() {
+    toggleInfoBox: function () {
       let infoBox = this.$refs.info;
       infoBox.toggle();
       if (infoBox.visible)
@@ -195,16 +193,13 @@ export default {
         this.$refs.overlay.deselectAllBoxes()
       }
     },
-
-    selectCrop: function(event) {
-        this.$refs.info.show(event);
+    selectCrop: function (event) {
+      this.$refs.info.show(event);
     },
-
-    infoBoxClosed: function() {
+    infoBoxClosed: function () {
       this.interaction = false;
       this.$refs.overlay.deselectAllBoxes()
     },
-
     resize: function () {
       const rect = this.$refs.root.getBoundingClientRect();
 
@@ -281,11 +276,11 @@ export default {
     },
     getLabels: function () {
       this.$root.socket.get(`/projects/${this.$root.project.identifier}/labels`)
-          .then(response => response.json())
-          .then(labels => {
-            this.labels = [];
-            labels.forEach(this.addLabelToList);
-          });
+        .then(response => response.json())
+        .then(labels => {
+          this.labels = [];
+          labels.forEach(this.addLabelToList);
+        });
     },
     addLabelToList: function (label) {
       if (label['project_id'] !== this.$root.project.identifier)
@@ -324,10 +319,10 @@ export default {
         this.zoomBox = false;
 
         this.$root.socket.get(`/data/${newVal.identifier}/results`)
-            .then(response => response.json())
-            .then(results => {
-              this.results = results;
-            })
+          .then(response => response.json())
+          .then(results => {
+            this.results = results;
+          })
         let infoBox = this.$refs.info;
         if (infoBox == undefined)
           return;

+ 2 - 0
webui/src/components/media/options-bar.vue

@@ -69,6 +69,7 @@
       <img alt="zoom bounding box" src="@/assets/icons/info.svg">
     </div>
 
+    <!--
     <div ref="zoom_annotation"
          class="image"
          title="zoom bounding box (X)"
@@ -90,6 +91,7 @@
          @click="$emit('nextzoom', true)">
       <img alt="zoom next bounding box" src="@/assets/icons/chevron-right.svg">
     </div>
+    -->
 
     <div class="spacer"/>