diff --git a/src/pages/detect.vue b/src/pages/detect.vue index b74941c..ebe5a8d 100644 --- a/src/pages/detect.vue +++ b/src/pages/detect.vue @@ -357,12 +357,6 @@ xhr.send() } }, - mounted() { - const imCanvas = this.$refs.image_cvs - const imageCtx = imCanvas.getContext("2d") - imageCtx.strokeStyle = 'yellow' - imageCtx.lineWidth = 3 - }, computed: { showResults () { var filteredResults = this.resultData.detections @@ -486,6 +480,8 @@ imCanvas.width = imCanvas.clientWidth imCanvas.height = imCanvas.clientHeight imageCtx.clearRect(0,0,imCanvas.width,imCanvas.height) + imageCtx.strokeStyle = 'yellow' + imageCtx.lineWidth = 3 return [imCanvas, imageCtx] }, getImage (searchImage) {