|
@@ -9,7 +9,7 @@
|
|
@mouseup.left="release"
|
|
@mouseup.left="release"
|
|
@dragstart.stop>
|
|
@dragstart.stop>
|
|
|
|
|
|
- <annotation-box v-for="(box, index) in boundingBoxes"
|
|
|
|
|
|
+ <annotation-box v-for="box in boundingBoxes"
|
|
v-bind:key="box.identifier"
|
|
v-bind:key="box.identifier"
|
|
ref="box"
|
|
ref="box"
|
|
:box="box"
|
|
:box="box"
|
|
@@ -18,7 +18,6 @@
|
|
:deletable="interaction === 'remove-box'"
|
|
:deletable="interaction === 'remove-box'"
|
|
:taggable="interaction === 'label-box' ? label : false"
|
|
:taggable="interaction === 'label-box' ? label : false"
|
|
:confirmable="interaction === 'confirm-box'"
|
|
:confirmable="interaction === 'confirm-box'"
|
|
- :zoomable="interaction === 'zoom-box'"
|
|
|
|
:croppable="interaction === 'info-box'"
|
|
:croppable="interaction === 'info-box'"
|
|
:labels="labels"
|
|
:labels="labels"
|
|
:shine="crop && box.identifier === crop.identifier"
|
|
:shine="crop && box.identifier === crop.identifier"
|
|
@@ -30,8 +29,7 @@
|
|
@labelBox="labelBox"
|
|
@labelBox="labelBox"
|
|
@remove="$emit('remove', $event)"
|
|
@remove="$emit('remove', $event)"
|
|
@confirm="$emit('confirm', $event)"
|
|
@confirm="$emit('confirm', $event)"
|
|
- @updateBox="updateBox"
|
|
|
|
- @zoom="zoomBox(index, $event)"/>
|
|
|
|
|
|
+ @updateBox="updateBox"/>
|
|
|
|
|
|
<annotation-box v-if="current"
|
|
<annotation-box v-if="current"
|
|
:position="current"/>
|
|
:position="current"/>
|
|
@@ -65,7 +63,6 @@ export default {
|
|
'results',
|
|
'results',
|
|
'labels',
|
|
'labels',
|
|
'crop',
|
|
'crop',
|
|
- 'zoom'
|
|
|
|
],
|
|
],
|
|
data: function () {
|
|
data: function () {
|
|
return {
|
|
return {
|
|
@@ -74,7 +71,6 @@ export default {
|
|
fixed: false,
|
|
fixed: false,
|
|
current: false,
|
|
current: false,
|
|
mousedown: false,
|
|
mousedown: false,
|
|
- zoomed: false
|
|
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -284,28 +280,6 @@ export default {
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- zoomBox: function (index) {
|
|
|
|
- if (this.boundingBoxes.length === 0) {
|
|
|
|
- this.zoomed = false;
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
- if (index < 0) {
|
|
|
|
- index = this.boundingBoxes.length - 1;
|
|
|
|
- } else if (index >= this.boundingBoxes.length) {
|
|
|
|
- index = 0;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- this.zoomed = index;
|
|
|
|
- this.$emit('zoom', this.boundingBoxes[index].data);
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- prevZoom: function () {
|
|
|
|
- this.zoomBox(this.zoomed - 1);
|
|
|
|
- },
|
|
|
|
-
|
|
|
|
- nextZoom: function () {
|
|
|
|
- this.zoomBox(this.zoomed + 1);
|
|
|
|
- },
|
|
|
|
|
|
|
|
labelBox: function (box_id, label_id) {
|
|
labelBox: function (box_id, label_id) {
|
|
this.$emit('labelBox', box_id, label_id);
|
|
this.$emit('labelBox', box_id, label_id);
|