summaryrefslogtreecommitdiff
path: root/js/app.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2014-12-11 16:15:06 -0500
committerJules Laplace <jules@okfoc.us>2014-12-11 16:15:06 -0500
commit2de4442f9aeb6a4fc5d49fab8a15b41d87ff2fe4 (patch)
treebe82d6abf894943528e358bf22ab472687835808 /js/app.js
parent66488f43e9c19e3c286ff93c051af21ce01c5b86 (diff)
starting to write this stuff the fishbone thing is screwing me up
Diffstat (limited to 'js/app.js')
-rw-r--r--js/app.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/js/app.js b/js/app.js
index 6deab95..65c883b 100644
--- a/js/app.js
+++ b/js/app.js
@@ -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){