Skip to content

Commit

Permalink
Reset camera filters. (#559)
Browse files Browse the repository at this point in the history
* Fix.

* Revert functionality.
  • Loading branch information
gpgabriel authored and Paul Varache committed Sep 29, 2016
1 parent 3971446 commit 567c0a2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/elements/kano-workspace-camera/kano-workspace-camera.html
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,10 @@
Kano.MakeApps.PartsAPI.camera.stop.apply(this, arguments);
this.reset();
},
reset () {
this._pausePictureList();
this.renderBlank();
},
// Support legacy code
getCamera () {
return this;
Expand All @@ -208,6 +212,11 @@
this._pausePictureList();
this._stopWebcam();
},
renderBlank () {
ctx = this.$.canvas.getContext('2d');
ctx.fillStyle = '#ffffff';
ctx.clearRect(0, 0, this.$.canvas.width, this.$.canvas.height);
},
renderOnCanvas (ctx, util, scaleFactor) {
return new Promise((resolve, reject) => {
let onRenderingDone = () => {
Expand Down

0 comments on commit 567c0a2

Please sign in to comment.