|
@@ -7,7 +7,7 @@
|
|
|
|
|
|
<annotation-box v-if="current"
|
|
|
:image="image"
|
|
|
- :supports="model.supports"
|
|
|
+ :supports="project.model.supports"
|
|
|
:position="current"/>
|
|
|
|
|
|
<annotation-box v-for="(result, index) in predictions"
|
|
@@ -19,7 +19,7 @@
|
|
|
:socket="socket"
|
|
|
:box-url="mediaUrl + '/' + result.id"
|
|
|
:labels="project.labels"
|
|
|
- :supports="model.supports"
|
|
|
+ :supports="project.model.supports"
|
|
|
@move="move"
|
|
|
@resize="resize"/>
|
|
|
</div>
|
|
@@ -31,7 +31,7 @@ import AnnotationBox from "@/components/media/annotation-box";
|
|
|
export default {
|
|
|
name: "annotated-image",
|
|
|
components: {AnnotationBox},
|
|
|
- props: ['data', 'project', 'model', 'socket'],
|
|
|
+ props: ['data', 'project', 'socket'],
|
|
|
mounted: function () {
|
|
|
window.addEventListener("resize", this.resizeEvent);
|
|
|
|
|
@@ -80,7 +80,8 @@ export default {
|
|
|
.filter(k => 'x' in k);
|
|
|
},
|
|
|
events: function () {
|
|
|
- if (this.model.supports.includes('bounding-boxes') || this.model.supports.includes('labeled-bounding-boxes'))
|
|
|
+ if (this.project.model.supports.includes('bounding-boxes')
|
|
|
+ || this.project.model.supports.includes('labeled-bounding-boxes')) {
|
|
|
return {
|
|
|
'touchstart': this.press,
|
|
|
'touchmove': this.track,
|
|
@@ -90,8 +91,9 @@ export default {
|
|
|
'mouseup': this.release,
|
|
|
'dragstart': e => e.stopPropagation()
|
|
|
}
|
|
|
- else
|
|
|
+ } else {
|
|
|
return {}
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
methods: {
|