diff options
| author | Jules Laplace <jules@okfoc.us> | 2014-11-22 21:57:25 -0500 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2014-11-22 21:57:25 -0500 |
| commit | 323e8804ee13f70c35b2a58179cd1a43eea56bcf (patch) | |
| tree | b1c6aa6fd50f54d5c7c4976dc5f4e7a6560df254 /js/app.js | |
| parent | fbbbe8cc0457c2f3f77cfc8d9b8070a593938694 (diff) | |
editable brush
Diffstat (limited to 'js/app.js')
| -rw-r--r-- | js/app.js | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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]) } }) |
