Skip to content

Commit

Permalink
0.10.10
Browse files Browse the repository at this point in the history
  • Loading branch information
MintyTrebor authored Jun 8, 2022
1 parent 5e3668e commit 5864eab
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/BtnCmdDataFunctions.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export default {
altWebCamURL: 'http://',
altWebCamRotation: 0,
altWebCamFlip: 'none',
altWebCamUpdateTimer: 5000,
altWebCamUpdateTimer: 0,
altWebCamiFrame: false,
altWebCamAppndHTTP: false,
altWebCamClickURL: ''
Expand Down
2 changes: 1 addition & 1 deletion src/BtnCmdPanelSettingsDialogue.vue
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
return tmpItems;
},
panelItemsFull(){ return [
{text: 'Alt Webcam', value: 'altwebcam', disabled: false, hSize: 283, wSize: 354},
{text: 'Alt Webcam', value: 'altwebcam', disabled: false, hSize: 275, wSize: 489},
{text: 'DWC Webcam', value: 'webcam', disabled: false, hSize: 283, wSize: 354},
{text: 'Baby-Stepping', value: 'z-babystep-panel', disabled: false, hSize: 200, wSize: 300},
// {text: 'CNC Axes Position', value: 'cnc-axes-position', disabled: true, hSize: 300, wSize: 380},
Expand Down
27 changes: 10 additions & 17 deletions src/altWebCamPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,13 @@ img {

<template>
<v-card>
<v-card-title>
{{ $t('panel.webcam.caption') }}{{ url }}
</v-card-title>

<v-card-text class="pa-0 img-container">
<v-responsive v-if="passedObject.altWebCamiFrame" :aspect-ratio="16/9">
<iframe :src="passedObject.altWebCamURL"></iframe>
<iframe :src="passedObject.altWebCamURL" :class="classList"></iframe>
</v-responsive>

<a v-else :href="passedObject.altWebCamClickURL ? passedObject.altWebCamClickURL : 'javascript:void(0)'">
<img :alt="$t('panel.webcam.alt')" :src="active ? url : ''" :class="imgClasses">
<img :alt="$t('panel.webcam.alt')" :src="active ? url : ''" :class="classList">
</a>
</v-card-text>
</v-card>
Expand All @@ -90,25 +86,22 @@ export default {
computed: {
...mapState('settings', ['webcam']),
...mapGetters('machine', ['connector']),
imgClasses() {
const classes = [];
classList() {
const result = [];
if (this.passedObject.altWebCamFlip === 'x' || this.passedObject.altWebCamFlip === 'both') {
classes.push('flip-x');
result.push('flip-x');
}
if (this.passedObject.altWebCamFlip === 'y' || this.passedObject.altWebCamFlip === 'both') {
classes.push('flip-y');
result.push('flip-y');
}
if (this.passedObject.altWebCamRotation === 90) {
classes.push('rotate-90');
result.push('rotate-90');
} else if (this.passedObject.altWebCamRotation === 180) {
classes.push('rotate-180');
result.push('rotate-180');
} else if (this.passedObject.altWebCamRotation === 270) {
classes.push('rotate-270');
result.push('rotate-270');
}
return classes;
return result;
}
},
data() {
Expand Down

0 comments on commit 5864eab

Please sign in to comment.