diff options
| author | Jules Laplace <jules@okfoc.us> | 2015-03-24 18:16:36 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2015-03-24 18:16:36 -0400 |
| commit | 8410a217e2a02257bd3a9d05e26c51cc8ae33086 (patch) | |
| tree | d7d5d5e536153234b8641ece8b3ee46cc193f879 /js/ui/palette.js | |
| parent | 5f5127573a185e8070ecff31c2b69e8911843b7e (diff) | |
no tabs
Diffstat (limited to 'js/ui/palette.js')
| -rw-r--r-- | js/ui/palette.js | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/js/ui/palette.js b/js/ui/palette.js index 3976100..04f56c2 100644 --- a/js/ui/palette.js +++ b/js/ui/palette.js @@ -1,31 +1,31 @@ var palette = (function(){ - var palette = new Matrix (32, 2, function(x,y){ - var lex = new Lex (x,y) - lex.bg = all_inv_hue(x>>1) - lex.build() - return lex - }) + var palette = new Matrix (32, 2, function(x,y){ + var lex = new Lex (x,y) + lex.bg = all_inv_hue(x>>1) + lex.build() + return lex + }) - palette.bind = function(){ - palette.forEach(function(lex, x, y){ - if (lex.bound) return - lex.bound = true + palette.bind = function(){ + palette.forEach(function(lex, x, y){ + if (lex.bound) return + lex.bound = true - lex.span.addEventListener('mousedown', function(e){ - e.preventDefault() - dragging = true - erasing = e.which == "3" - brush.fg = lex.bg - brush.bg = lex.bg - if (! brush.modified) { - brush.generate() - } - }) + lex.span.addEventListener('mousedown', function(e){ + e.preventDefault() + dragging = true + erasing = e.which == "3" + brush.fg = lex.bg + brush.bg = lex.bg + if (! brush.modified) { + brush.generate() + } + }) - }) - } - - return palette + }) + } + + return palette })() |
