diff --git a/chameleon-client/src/components/OutputTab/DualCalibration.vue b/chameleon-client/src/components/OutputTab/DualCalibration.vue index 22b95ccc5..4513a1cbc 100644 --- a/chameleon-client/src/components/OutputTab/DualCalibration.vue +++ b/chameleon-client/src/components/OutputTab/DualCalibration.vue @@ -40,13 +40,13 @@ if (isNaN(m) === false && isNaN(b) === false) { this.sendSlope(m, b, true); } else { - this.$emit('snackbar'); + this.$emit('snackbar',"Points are too close"); } this.pointA = undefined; this.pointB = undefined; } }, - sendSlope(m, b, valid) { + sendSlope(m, b) { this.handleInput('dualTargetCalibrationM', m); this.handleInput('dualTargetCalibrationB', b); this.$emit('update'); diff --git a/chameleon-client/src/components/OutputTab/SingleCalibration.vue b/chameleon-client/src/components/OutputTab/SingleCalibration.vue index 9db8687df..75d6edee2 100644 --- a/chameleon-client/src/components/OutputTab/SingleCalibration.vue +++ b/chameleon-client/src/components/OutputTab/SingleCalibration.vue @@ -21,20 +21,11 @@ this.$emit('update'); }, takePoint() { - let hasNaN = false; - console.log(this.rawPoint); - for (let i = 0; i < this.rawPoint.length&&!hasNaN; i++) { - hasNaN = !(this.rawPoint[i]||this.rawPoint[i]===0); - } - if(!hasNaN){//if array doesnt have undefined values - console.log("sending points"); + if (this.rawPoint[0] && this.rawPoint[1]) { this.handleInput('point', this.rawPoint); this.$emit('update'); - } - else - { - console.log("sending error"); - this.$emit('snackbar'); + } else { + this.$emit('snackbar',"No target found"); } } } diff --git a/chameleon-client/src/views/Camera.vue b/chameleon-client/src/views/Camera.vue index 20249c843..5d04f9ce2 100644 --- a/chameleon-client/src/views/Camera.vue +++ b/chameleon-client/src/views/Camera.vue @@ -96,13 +96,15 @@ + @change="handleInput('isBinary',pipeline.isBinary)" v-if="currentPipelineIndex !== 0"> Normal Threshold +
- + No Cameras Are connected
{{point}}
@@ -157,8 +159,8 @@ CVinput }, methods: { - onImageClick(event){ - if(this.selectedTab ===1){ + onImageClick(event) { + if (this.selectedTab === 1) { this.$refs.component.onClick(event); } }, @@ -337,7 +339,7 @@ .videoClass img { max-height: 70vh; - max-width:70%; + max-width: 70%; width: 70%; object-fit: cover; vertical-align: middle; diff --git a/chameleon-client/src/views/CameraViewes/OutputTab.vue b/chameleon-client/src/views/CameraViewes/OutputTab.vue index 28f5121d5..daa85718a 100644 --- a/chameleon-client/src/views/CameraViewes/OutputTab.vue +++ b/chameleon-client/src/views/CameraViewes/OutputTab.vue @@ -8,9 +8,9 @@ - + - {{getErrorMsg()}} + {{snackbarText}} Close @@ -41,20 +41,16 @@ doUpdate() { this.$emit('update') }, - getErrorMsg() - { - switch (this.value.calibrationMode) { - case 1: - return "No target found"; - case 2: - return "Points are too close" - } - } + showSnackbar(message){ + this.snackbarText = message; + this.snackbar = true; + }, }, data() { return { snackbar: false, + snackbarText:"" } }, computed: {