diff options
| author | Jules Laplace <jules@okfoc.us> | 2015-06-03 19:07:49 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2015-06-03 19:07:49 -0400 |
| commit | 142807d8ea506e792dd662ca67ad3a6d49659b57 (patch) | |
| tree | ef590093c0ad5c6187a5a31697efbf3959994a53 /js/ui/controls.js | |
| parent | 6cb13ad54e3d807a181285fc7b1befa55b0bc264 (diff) | |
fix some weird focus issues
Diffstat (limited to 'js/ui/controls.js')
| -rw-r--r-- | js/ui/controls.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/js/ui/controls.js b/js/ui/controls.js index 6a6c005..81a40e0 100644 --- a/js/ui/controls.js +++ b/js/ui/controls.js @@ -136,7 +136,7 @@ var controls = (function(){ // - ShaderTool = Tool.extend({ + var ShaderTool = Tool.extend({ active: false, use: function(state){ this.active = typeof state == "boolean" ? state : ! this.active @@ -148,7 +148,11 @@ var controls = (function(){ shader_rapper.style.display = "none" } }, - }) + done: function(){ + this.use(false) + console.log("shader done") + } + }) controls.shader = new ShaderTool (shader_el) shader_textarea.value = demo_shader.innerHTML shader_textarea.addEventListener("input", function(){ @@ -159,6 +163,8 @@ var controls = (function(){ controls.animate.use = function(state){ var state = shader.toggle() this.update(state) + controls.shader.focus() + controls.shader.use(true) } controls.experimental_palette = new HiddenCheckbox (experimental_palette_toggle) |
