diff options
| author | Jules Laplace <jules@okfoc.us> | 2014-12-11 16:15:06 -0500 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2014-12-11 16:15:06 -0500 |
| commit | 2de4442f9aeb6a4fc5d49fab8a15b41d87ff2fe4 (patch) | |
| tree | be82d6abf894943528e358bf22ab472687835808 /js/app.js | |
| parent | 66488f43e9c19e3c286ff93c051af21ce01c5b86 (diff) | |
starting to write this stuff the fishbone thing is screwing me up
Diffstat (limited to 'js/app.js')
| -rw-r--r-- | js/app.js | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -1,7 +1,8 @@ var dragging = false -var drawing = true +var drawing = false var erasing = false +var selecting = false var focused var canvas, tools, palette, controls, brush, mode, current_tool, current_canvas @@ -35,9 +36,14 @@ function bind () { controls.bind() keys.bind() - window.addEventListener('mouseup', function(){ + window.addEventListener('mouseup', function(e){ dragging = erasing = false - if (current_tool.name != 'shader' && current_tool.name != 'load' && current_tool.name != 'save') { cursor_input.focus() } + if (current_tool.name != 'shader' && current_tool.name != 'load' && current_tool.name != 'save') { + cursor_input.focus() + } + if (selecting) { + selection.up(e) + } }); window.addEventListener('mousedown', function(e){ |
