summaryrefslogtreecommitdiff
path: root/js/ui/brush.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/ui/brush.js')
-rw-r--r--js/ui/brush.js28
1 files changed, 14 insertions, 14 deletions
diff --git a/js/ui/brush.js b/js/ui/brush.js
index a055a97..50f6e07 100644
--- a/js/ui/brush.js
+++ b/js/ui/brush.js
@@ -7,20 +7,6 @@ var brush = (function(){
})
brush.modified = false
-
- brush.bind = function(){
- brush.forEach(function(lex, x, y){
- if (lex.bound) return
- lex.bound = true
-
- lex.span.addEventListener('mousedown', function(e){
- e.preventDefault()
- dragging = true
- // lex.fill(lex.fg, lex.bg)
- })
-
- })
- }
brush.bind = function(){
@@ -70,8 +56,22 @@ var brush = (function(){
})
}
+ brush.expand = function(i){
+ var w = this.w = clamp(this.w+i, 1, 9), h = this.h = clamp(this.h+i, 1, 9)
+ controls.width.char = ""+w
+ controls.width.build()
+ controls.height.char = ""+h
+ controls.height.build()
+ this.rebuild()
+ }
+ brush.contract = function(i){
+ this.expand(-i)
+ }
+
+ brush.char = " "
brush.fg = 0
brush.bg = 1
+ brush.opacity = 1
return brush