|
@@ -8,14 +8,8 @@
|
|
|
@filter="filter = $event"
|
|
|
:labelsEnabled="labelsEnabled"
|
|
|
@labelSelector="openLabelSelector()"
|
|
|
- :zoomBox="zoomBox"
|
|
|
- :infoBox="infoBox !== false"
|
|
|
- @infoBox="infoBox = $event; interaction=false"
|
|
|
- @unzoom="zoomBox=false; interaction=false"
|
|
|
@predict="predictImage"
|
|
|
- @confirmAll="confirmAll"
|
|
|
- @prevzoom="$refs.overlay.prevZoom()"
|
|
|
- @nextzoom="$refs.overlay.nextZoom()"/>
|
|
|
+ @confirmAll="confirmAll"/>
|
|
|
|
|
|
<label-selector v-if="labelSelector"
|
|
|
:labels="labels"
|
|
@@ -30,7 +24,6 @@
|
|
|
<!-- image -->
|
|
|
<img v-if="current.type === 'image'"
|
|
|
ref="media" :src="src" alt="media"
|
|
|
- :style="cropPosition"
|
|
|
@load="change"
|
|
|
@loadedmetadata="change"
|
|
|
@loadeddata="change"
|
|
@@ -71,9 +64,7 @@
|
|
|
@confirm="confirm"
|
|
|
@updateBox="updateBox"
|
|
|
@estimateBox="estimateBox"
|
|
|
- @crop="infoBox = $event"
|
|
|
- :zoom="zoomBox"
|
|
|
- @zoom="zoomBox = $event"/>
|
|
|
+ @crop="infoBox = $event"/>
|
|
|
</div>
|
|
|
|
|
|
<cropped-image v-if="infoBox !== false"
|
|
@@ -132,7 +123,6 @@ export default {
|
|
|
play: false
|
|
|
},
|
|
|
infoBox: false,
|
|
|
- zoomBox: false,
|
|
|
supported: {
|
|
|
labeledImages: false,
|
|
|
boundingBoxes: false,
|
|
@@ -211,21 +201,7 @@ export default {
|
|
|
height: this.image.height + 'px'
|
|
|
}
|
|
|
},
|
|
|
- cropPosition: function () {
|
|
|
- if (!this.zoomBox)
|
|
|
- return {
|
|
|
- transform: ``,
|
|
|
- };
|
|
|
|
|
|
- const posX = 0.5 - (this.zoomBox.x + this.zoomBox.w / 2);
|
|
|
- const posY = 0.5 - (this.zoomBox.y + this.zoomBox.h / 2);
|
|
|
- const factor = 0.75 / Math.max(this.zoomBox.w, this.zoomBox.h);
|
|
|
-
|
|
|
- // use a transition to use the transitionend event to recalculate box positions
|
|
|
- return {
|
|
|
- transform: `scale(${factor}) translateX(${posX * 100}%) translateY(${posY * 100}%)`
|
|
|
- };
|
|
|
- },
|
|
|
labelsEnabled: function() {
|
|
|
|
|
|
return this.model
|
|
@@ -462,8 +438,6 @@ export default {
|
|
|
this.video.play = false;
|
|
|
this.video.frame = 0;
|
|
|
|
|
|
- this.zoomBox = false;
|
|
|
-
|
|
|
this.$root.socket.get(`/data/${newVal.identifier}/results`)
|
|
|
.then(response => response.json())
|
|
|
.then(results => {
|