From 8752354fa9b2b8c03b47b33a75e0ca95e8335d97 Mon Sep 17 00:00:00 2001 From: Julie Lala Date: Tue, 18 Aug 2015 08:41:40 -0400 Subject: check if changed before autouploading, hide filetool, other stuff.. --- css/sally.css | 1 - index.html | 2 +- js/clipboard.js | 3 ++- js/ui/controls.js | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/css/sally.css b/css/sally.css index 3422979..8c4dc9e 100644 --- a/css/sally.css +++ b/css/sally.css @@ -192,7 +192,6 @@ textarea { font-size:12pt; width: 37vw; height: 300px; background: #333; color: border: 1px solid #0f0; color: #0f0; width: 100%; - display: none; } #upload_button.uploading { background: transparent; diff --git a/index.html b/index.html index 999ded4..2653185 100644 --- a/index.html +++ b/index.html @@ -50,7 +50,7 @@ webcam load save - clear
+ new
diff --git a/js/clipboard.js b/js/clipboard.js index 7e683dc..a7dc8f6 100644 --- a/js/clipboard.js +++ b/js/clipboard.js @@ -122,7 +122,8 @@ var clipboard = (function () { lex.build() } } - + + current_filetool && current_filetool.blur() }, import_text: function () { diff --git a/js/ui/controls.js b/js/ui/controls.js index a21e293..c191cc2 100644 --- a/js/ui/controls.js +++ b/js/ui/controls.js @@ -72,6 +72,7 @@ var controls = (function(){ undo.new() undo.save_rect(0, 0, canvas.w, canvas.h) canvas.erase() + current_filetool && current_filetool.blur() } controls.webcam = new FileTool (webcam_el) @@ -119,9 +120,9 @@ var controls = (function(){ }) controls.save = new ClipboardTool (save_el) controls.save.use = function(){ + changed && clipboard.upload_png() clipboard.show() clipboard.export_mode() - clipboard.upload_png() } controls.load = new ClipboardTool (load_el) controls.load.use = function(){ -- cgit v1.2.3-70-g09d2