From ff9c8b35f2e878ac4ab0a89079b5d25d44d9de9b Mon Sep 17 00:00:00 2001 From: timb Date: Wed, 22 Jul 2015 00:48:16 -0700 Subject: make clear use undo rather than confirm modal --- js/ui/controls.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'js') 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) -- cgit v1.2.3-70-g09d2