Skip to content

Commit

Permalink
Package update
Browse files Browse the repository at this point in the history
  • Loading branch information
smronju committed Oct 10, 2016
1 parent 0993e75 commit 7bf972c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 29 deletions.
14 changes: 10 additions & 4 deletions VueWebcam.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// TODO:
// 1. Enable mirror option
// 2. Improve options handling
// 3. Error handling

const Vue = require('vue');

const WebcamComponent = Vue.extend({
Expand All @@ -8,8 +13,7 @@ const WebcamComponent = Vue.extend({
width: this.width,
height: this.height,
src: this.src,
autoplay: this.autoplay,
style: this.styleObject
autoplay: this.autoplay
}
});
},
Expand Down Expand Up @@ -64,14 +68,16 @@ const WebcamComponent = Vue.extend({
canvas.width = video.clientWidth;
this.canvas = canvas;

if (this.mirror) {
this.ctx = canvas.getContext('2d');

/*if (this.mirror) {
const context = canvas.getContext('2d');
context.translate(canvas.width, 0);
context.scale(-1, 1);
this.ctx = context;
} else {
this.ctx = canvas.getContext('2d');
}
}*/
}

const { ctx, canvas } = this;
Expand Down
24 changes: 0 additions & 24 deletions npm-debug.log

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-webcam",
"version": "2.0.2",
"version": "2.0.4",
"description": "A Vue component for capturing image from webcam.",
"main": "VueWebcam.js",
"keywords": [
Expand Down

0 comments on commit 7bf972c

Please sign in to comment.