diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000..e32d92f4
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,12 @@
+node_modules
+.DS_Store
+design
+*.log
+packages/test
+dist
+temp
+.vuerc
+.version
+.versions
+.changelog
+package-lock.json
diff --git a/src/components/panels/Settings/WebcamPanel.vue b/src/components/panels/Settings/WebcamPanel.vue
index a2278e5b..79207e7f 100644
--- a/src/components/panels/Settings/WebcamPanel.vue
+++ b/src/components/panels/Settings/WebcamPanel.vue
@@ -1,7 +1,5 @@
@@ -13,18 +11,27 @@
-
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -38,24 +45,56 @@
},
data: function() {
return {
-
+ rotationEnabled: false
}
},
computed: {
webcamUrl: {
get() {
- return this.$store.state.webcam.url;
+ return this.$store.state.gui.webcam.url;
},
- set(newWebcamUrl) {
- return this.$store.dispatch('setSettings', { webcam: { url: newWebcamUrl } });
+ set(url) {
+ return this.$store.dispatch('setSettings', { gui: { webcam: { url } } });
+ }
+ },
+ flipX: {
+ get() {
+ return this.$store.state.gui.webcam.flipX;
+ },
+ set(flipX) {
+ return this.$store.dispatch('setSettings', { gui: { webcam: { flipX } } });
+ }
+ },
+ flipY: {
+ get() {
+ return this.$store.state.gui.webcam.flipY;
+ },
+ set(flipY) {
+ return this.$store.dispatch('setSettings', { gui: { webcam: { flipY } } });
+ }
+ },
+ rotate: {
+ get() {
+ return this.$store.state.gui.webcam.rotate;
+ },
+ set(rotate) {
+ return this.$store.dispatch('setSettings', { gui: { webcam: { rotate } } });
+ }
+ },
+ rotateDegrees: {
+ get() {
+ return this.$store.state.gui.webcam.rotateDegrees;
+ },
+ set(rotateDegrees) {
+ return this.$store.dispatch('setSettings', { gui: { webcam: { rotateDegrees } } });
}
},
boolNavi: {
get() {
return this.$store.state.gui.webcam.bool;
},
- set(bool) {
- return this.$store.dispatch('setSettings', { gui: { webcam: { bool: bool } } });
+ set(showNav) {
+ return this.$store.dispatch('setSettings', { gui: { webcam: { bool: showNav } } });
}
},
},
diff --git a/src/components/panels/WebcamPanel.vue b/src/components/panels/WebcamPanel.vue
index a1847ae4..f4997997 100644
--- a/src/components/panels/WebcamPanel.vue
+++ b/src/components/panels/WebcamPanel.vue
@@ -14,7 +14,7 @@
-
+
@@ -25,19 +25,29 @@
export default {
components: {
- },
- data: function() {
- return {
-
- }
},
computed: {
...mapState({
- webcamUrl: state => state.webcam.url,
- })
+ 'webcamConfig': state => state.gui.webcam
+ }),
+ webcamStyle() {
+ var transforms = '';
+ if (this.webcamConfig.flipX) {
+ transforms += ' scaleX(-1)'
+ }
+ if (this.webcamConfig.flipY) {
+ transforms += ' scaleY(-1)'
+ }
+ if (this.webcamConfig.rotate && this.webcamConfig.rotateDegrees) {
+ transforms += ` rotate(${this.webcamConfig.rotateDegrees}deg)`
+ }
+ if (transforms.trimLeft().length) {
+ return {
+ transform: transforms.trimLeft(),
+ }
+ }
+ return '';
+ }
},
- methods: {
-
- }
}
\ No newline at end of file
diff --git a/src/pages/Webcam.vue b/src/pages/Webcam.vue
index 40ff7695..a9baacf5 100644
--- a/src/pages/Webcam.vue
+++ b/src/pages/Webcam.vue
@@ -12,8 +12,6 @@