summaryrefslogtreecommitdiff
path: root/js/ui/controls.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2014-12-12 00:05:37 -0500
committerJules Laplace <jules@okfoc.us>2014-12-12 00:05:37 -0500
commita0b65f2e1a81b6fec30b4c1c2b2764c8dbcd64a9 (patch)
treebe95e2ee25e68d4543216007fdb9cf4345ea5d3e /js/ui/controls.js
parent4c7134419292002e1ff4c6b6100a7a9ec37ced43 (diff)
flood fill
Diffstat (limited to 'js/ui/controls.js')
-rw-r--r--js/ui/controls.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/js/ui/controls.js b/js/ui/controls.js
index 293cd1d..bbf93cc 100644
--- a/js/ui/controls.js
+++ b/js/ui/controls.js
@@ -7,6 +7,7 @@ var controls = (function(){
brush.generate = controls.circle.generate
brush.generate()
drawing = true
+ filling = false
selection.hide()
brush.modified = false
}
@@ -30,6 +31,7 @@ var controls = (function(){
brush.generate()
brush.modified = false
drawing = true
+ filling = false
selection.hide()
}
controls.square.generate = function(){
@@ -42,6 +44,7 @@ var controls = (function(){
brush.generate = controls.text.generate
brush.generate()
drawing = false
+ filling = false
selection.hide()
}
controls.text.generate = function(){
@@ -50,9 +53,15 @@ var controls = (function(){
controls.select = new Tool (select_el)
controls.select.use = function(){
drawing = false
+ filling = false
selection.show()
}
- controls.text.generate = function(){
+
+ controls.fill = new Tool (fill_el)
+ controls.fill.use = function(){
+ drawing = false
+ filling = true
+ selection.hide()
}
controls.clear = new Tool (clear_el)
@@ -137,6 +146,7 @@ var controls = (function(){
controls.square,
controls.circle,
controls.text,
+ controls.fill,
controls.select,
controls.clear,
controls.grid,