diff --git a/src/pages/detect.vue b/src/pages/detect.vue index 1a510ed..a1a8f7f 100644 --- a/src/pages/detect.vue +++ b/src/pages/detect.vue @@ -501,9 +501,9 @@ this.imCvsLocation.left = imageLoc[0].cvsLeft this.imCvsLocation.width = imageLoc[0].cvsRight - imageLoc[0].cvsLeft this.imCvsLocation.height = imageLoc[0].cvsBottom - imageLoc[0].cvsTop - if (drawChip) {imageCtx.filter = "grayscale(1) opacity(.5)"} + if (drawChip) {imageCtx.globalAlpha = .5} imageCtx.drawImage(this.imageView, 0, 0, this.imageView.width, this.imageView.height, this.imCvsLocation.left, this.imCvsLocation.top, this.imCvsLocation.width, this.imCvsLocation.height) - if (drawChip) {imageCtx.filter = "grayscale(0) opacity(1)"} + if (drawChip) {imageCtx.globalAlpha = 1} } this.structureZoomed = false return [imCanvas, imageCtx]