diff options
| author | Jules Laplace <jules@okfoc.us> | 2015-05-05 03:37:44 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2015-05-05 03:37:44 -0400 |
| commit | 0e4af74255a161ecaeb31cd831c33d9698ca1e9e (patch) | |
| tree | 5c7defa37c2ecff3edb22810b8537ed297fdd84c /js | |
| parent | 1908b82d0bfa01267e623636b5bd0aca82a6ce82 (diff) | |
show/hide webcam
Diffstat (limited to 'js')
| -rw-r--r-- | js/ui/controls.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/js/ui/controls.js b/js/ui/controls.js index 982871a..fa2a240 100644 --- a/js/ui/controls.js +++ b/js/ui/controls.js @@ -90,6 +90,22 @@ var controls = (function(){ controls.clear.use = function(){ canvas.erase() } + + controls.webcam = new Tool (webcam_el) + controls.webcam.load = function(){ + webcam_close.addEventListener("click", function(){ controls.webcam.blur() }) + } + controls.webcam.use = function(){ + if (! this.loaded) { + this.load() + } + webcam_iframe.src = "webcam.html" + webcam_rapper.style.display = "block" + } + controls.webcam.done = function(){ + webcam_iframe.src = "" + webcam_rapper.style.display = "none" + } controls.grid = new Checkbox (grid_el) controls.grid.use = function(){ @@ -196,6 +212,7 @@ var controls = (function(){ controls.select, controls.clear, controls.grid, + controls.webcam, controls.fg, controls.bg, controls.char, |
