|
@@ -6,6 +6,7 @@
|
|
|
|
|
|
<annotation-box v-for="(box, index) in boundingBoxes"
|
|
|
v-bind:key="box.id"
|
|
|
+ ref="box"
|
|
|
:box="box"
|
|
|
:position="box.data"
|
|
|
:draggable="interaction === 'move-box'"
|
|
@@ -41,7 +42,18 @@ import AnnotationBox from "@/components/media/annotation-box";
|
|
|
export default {
|
|
|
name: "annotation-overlay",
|
|
|
components: {AnnotationBox},
|
|
|
- props: ['file', 'position', 'size', 'interaction', 'filter', 'label', 'video', 'results', 'labels', 'zoom'],
|
|
|
+ props: [
|
|
|
+ 'file',
|
|
|
+ 'position',
|
|
|
+ 'size',
|
|
|
+ 'interaction',
|
|
|
+ 'filter',
|
|
|
+ 'label',
|
|
|
+ 'video',
|
|
|
+ 'results',
|
|
|
+ 'labels',
|
|
|
+ 'zoom'
|
|
|
+ ],
|
|
|
data: function () {
|
|
|
return {
|
|
|
callback: false,
|
|
@@ -258,7 +270,17 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
crop: function (box) {
|
|
|
- this.$emit('crop', box);
|
|
|
+ this.deselectAllBoxes();
|
|
|
+ if (box == undefined)
|
|
|
+ return;
|
|
|
+
|
|
|
+ this.$emit('crop', box);
|
|
|
+ },
|
|
|
+
|
|
|
+ deselectAllBoxes: function(){
|
|
|
+ this.$refs.box.forEach( child => {
|
|
|
+ child.selected = false;
|
|
|
+ })
|
|
|
},
|
|
|
|
|
|
zoomBox: function (index) {
|