summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authortimb <opuscule@gmail.com>2015-07-22 00:48:16 -0700
committertimb <opuscule@gmail.com>2015-07-22 00:48:16 -0700
commitff9c8b35f2e878ac4ab0a89079b5d25d44d9de9b (patch)
tree6e2d5226f8b49e4e308f89b5bf4bf1061fb58ef4 /js
parent5e526fdc1d574ffd4de9dca2cc836faba2d90ebc (diff)
make clear use undo rather than confirm modal
Diffstat (limited to 'js')
-rw-r--r--js/ui/controls.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/js/ui/controls.js b/js/ui/controls.js
index 84a9d9b..485046e 100644
--- a/js/ui/controls.js
+++ b/js/ui/controls.js
@@ -69,9 +69,9 @@ var controls = (function(){
controls.clear = new BlurredTool (clear_el)
controls.clear.use = function(){
- if (confirm("really delete this colorcode?")) {
- canvas.erase()
- }
+ undo.new()
+ undo.save_rect(0, 0, canvas.w, canvas.h)
+ canvas.erase()
}
controls.webcam = new FileTool (webcam_el)