summaryrefslogtreecommitdiff
path: root/js/app.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2014-11-22 21:57:25 -0500
committerJules Laplace <jules@okfoc.us>2014-11-22 21:57:25 -0500
commit323e8804ee13f70c35b2a58179cd1a43eea56bcf (patch)
treeb1c6aa6fd50f54d5c7c4976dc5f4e7a6560df254 /js/app.js
parentfbbbe8cc0457c2f3f77cfc8d9b8070a593938694 (diff)
editable brush
Diffstat (limited to 'js/app.js')
-rw-r--r--js/app.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/js/app.js b/js/app.js
index 715def9..919a39d 100644
--- a/js/app.js
+++ b/js/app.js
@@ -4,7 +4,7 @@ var drawing = true
var erasing = false
var focused
-var canvas, tools, palette, controls, brush, mode, current_tool
+var canvas, tools, palette, controls, brush, mode, current_tool, current_canvas
function init () {
build()
@@ -55,12 +55,14 @@ function bind () {
if (current_tool.name != "text") {
e.preventDefault()
brush.contract(1)
+ brush.modified = false
break
}
case 221: // ]
if (current_tool.name != "text") {
e.preventDefault()
brush.expand(1)
+ brush.modified = false
break
}
case 8:
@@ -120,7 +122,7 @@ function bind () {
if (focused && char) {
var y = focused.y, x = focused.x
focused.key(char, e.keyCode)
- canvas.focusLex(y + direction[0], focused.x + direction[1])
+ current_canvas.focusLex(y + direction[0], focused.x + direction[1])
}
})