diff options
| author | Jules Laplace <jules@okfoc.us> | 2014-11-22 10:43:51 -0500 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2014-11-22 10:43:51 -0500 |
| commit | 2464f6e5d4d190631efbb738e56d9c2c810f7ced (patch) | |
| tree | 3af1457dc816c178cb3efbb1d8f795257b6d77bb /js | |
| parent | 19c41332c434dddfa76da972c0b587632dd4668e (diff) | |
toggle textarea
Diffstat (limited to 'js')
| -rw-r--r-- | js/app.js | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -95,6 +95,15 @@ function build () { document.body.classList.toggle('grid') } + controls.shader = new Tool (shader_el) + controls.shader.use = function(){ + shader_textarea.style.display = "block" + } + controls.shader.blur = function(){ + Tool.prototype.blur.call(this) + shader_textarea.style.display = "none" + } + controls.width = new Lex (width_el) controls.height = new Lex (height_el) controls.canvas_width = new Lex (canvas_width_el) @@ -155,7 +164,7 @@ function bind () { }) }); - [controls.square, controls.circle, controls.text, controls.clear, controls.grid].forEach(function(tool){ + [controls.square, controls.circle, controls.text, controls.clear, controls.grid, controls.shader].forEach(function(tool){ tool.span.addEventListener('mousedown', function(e){ tool.focus() }) @@ -221,6 +230,10 @@ function bind () { break } }) + + document.addEventListener('DOMContentLoaded', function(){ + document.body.classList.remove('loading') + }) } |
