|
@@ -9,6 +9,7 @@
|
|
|
:label="label"
|
|
|
@label="label = $event"
|
|
|
:labels="labels"
|
|
|
+ @infoBox="toggleInfoBox()"
|
|
|
:zoomBox="zoomBox"
|
|
|
@unzoom="zoomBox=false; interaction=false"
|
|
|
@prevzoom="$refs.overlay.prevZoom()"
|
|
@@ -47,9 +48,14 @@
|
|
|
:video="video"
|
|
|
:results="results"
|
|
|
:labels="labels"
|
|
|
+ @crop="selectCrop($event)"
|
|
|
:zoom="zoomBox"
|
|
|
@zoom="zoomBox = $event"/>
|
|
|
</div>
|
|
|
+
|
|
|
+ <cropped-image ref="info"
|
|
|
+ :file="current"
|
|
|
+ />
|
|
|
</template>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -58,15 +64,16 @@
|
|
|
import AnnotationOverlay from "@/components/media/annotation-overlay";
|
|
|
import VideoControl from "@/components/media/video-control";
|
|
|
import OptionsBar from "@/components/media/options-bar";
|
|
|
+import CroppedImage from "@/components/media/cropped-image";
|
|
|
|
|
|
export default {
|
|
|
name: "annotated-image",
|
|
|
- components: {OptionsBar, VideoControl, AnnotationOverlay},
|
|
|
+ components: {OptionsBar, VideoControl, AnnotationOverlay, CroppedImage},
|
|
|
props: ['current'],
|
|
|
mounted: function () {
|
|
|
// add resize listener
|
|
|
window.addEventListener('resize', this.resize);
|
|
|
- this.interval = setInterval(this.resize, 1000);
|
|
|
+ this.interval = setInterval(this.resize, 100);
|
|
|
this.resize();
|
|
|
|
|
|
// add result listener
|
|
@@ -123,6 +130,7 @@ export default {
|
|
|
frame: 0,
|
|
|
play: false
|
|
|
},
|
|
|
+ selectedCrop: null,
|
|
|
zoomBox: false,
|
|
|
supported: {
|
|
|
labeledImages: false,
|
|
@@ -173,6 +181,16 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+
|
|
|
+ toggleInfoBox: function() {
|
|
|
+ this.$refs.info.toggle();
|
|
|
+ this.interaction = this.$refs.info.visible ? 'info-box' : false;
|
|
|
+ },
|
|
|
+
|
|
|
+ selectCrop: function(event) {
|
|
|
+ this.$refs.info.show(event);
|
|
|
+ },
|
|
|
+
|
|
|
resize: function () {
|
|
|
const rect = this.$refs.root.getBoundingClientRect();
|
|
|
|