diff options
Diffstat (limited to 'js/ui')
| -rw-r--r-- | js/ui/controls.js | 12 | ||||
| -rw-r--r-- | js/ui/selection.js | 1 |
2 files changed, 7 insertions, 6 deletions
diff --git a/js/ui/controls.js b/js/ui/controls.js index d89c7f6..141bc9a 100644 --- a/js/ui/controls.js +++ b/js/ui/controls.js @@ -64,7 +64,7 @@ var controls = (function(){ } } - controls.webcam = new BlurredTool (webcam_el) + controls.webcam = new FileTool (webcam_el) controls.webcam.load = function(){ this.loaded = true webcam_close.addEventListener("click", function(){ controls.webcam.blur() }) @@ -101,7 +101,7 @@ var controls = (function(){ this.update( state ) } - ClipboardTool = Tool.extend({ + ClipboardTool = FileTool.extend({ blur: function(){ this.__blur() clipboard.hide() @@ -114,13 +114,14 @@ var controls = (function(){ } controls.load = new ClipboardTool (load_el) controls.load.use = function(){ + // console.log("use") clipboard.show() clipboard.import_mode() } // - var ShaderTool = Tool.extend({ + var ShaderTool = FileTool.extend({ active: false, use: function(state){ this.active = typeof state == "boolean" ? state : ! this.active @@ -130,6 +131,7 @@ var controls = (function(){ } else { shader_rapper.style.display = "none" } + console.log("use", this.active) }, done: function(){ this.use(false) @@ -141,11 +143,11 @@ var controls = (function(){ var fn = shader.build(shader_textarea.value) fn && shader.run(canvas) }) - controls.animate = new Checkbox (animate_checkbox) + controls.animate = new BlurredCheckbox (animate_checkbox) controls.animate.use = function(state){ var state = shader.toggle() this.update(state) - controls.shader.focus() + // controls.shader.focus() controls.shader.use(true) } diff --git a/js/ui/selection.js b/js/ui/selection.js index 2ef2941..fe0c943 100644 --- a/js/ui/selection.js +++ b/js/ui/selection.js @@ -56,7 +56,6 @@ var selection = (function(){ var cell_top = cell.offsetTop var cell_width = cell.offsetWidth var cell_height = cell.offsetHeight - if (canvas.grid) { cell_width++; cell_height++ } var w = width(aa, bb) var h = height(aa, bb) |
