From 2f342013b2768bd9c3c19c41658868bd2f3eff7f Mon Sep 17 00:00:00 2001 From: Dipansh Khandelwal Date: Sat, 23 Dec 2017 23:54:30 +0530 Subject: [PATCH 1/3] Added clear option --- images/clear.svg | 27 +++++++++++++++++++++++++++ index.html | 3 +++ js/activity.js | 7 +++++++ 3 files changed, 37 insertions(+) create mode 100644 images/clear.svg diff --git a/images/clear.svg b/images/clear.svg new file mode 100644 index 0000000..63712d8 --- /dev/null +++ b/images/clear.svg @@ -0,0 +1,27 @@ + + + + +Created by potrace 1.15, written by Peter Selinger 2001-2017 + + + + + + + + diff --git a/index.html b/index.html index 88e80ac..de1f4c8 100644 --- a/index.html +++ b/index.html @@ -16,6 +16,9 @@ +
diff --git a/js/activity.js b/js/activity.js index 2595c9b..8558dec 100644 --- a/js/activity.js +++ b/js/activity.js @@ -251,5 +251,12 @@ define(function (require) { update = true; shape = shape + 1; } + + document.getElementById('clear-button').addEventListener('click',function(){ + var canvasContext = canvas.getContext('2d'); + canvasContext.clearRect(0, 0, canvas.width, canvas.height); + canvasContext.beginPath(); + }); + }); }); From a38ca1042c1adc036ed97c78804376e2a3264f13 Mon Sep 17 00:00:00 2001 From: Dipansh Khandelwal Date: Sun, 24 Dec 2017 13:52:04 +0530 Subject: [PATCH 2/3] Pull the clear button on left side --- css/activity.css | 4 ++++ index.html | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/css/activity.css b/css/activity.css index bd9a48f..4f090bf 100644 --- a/css/activity.css +++ b/css/activity.css @@ -5,3 +5,7 @@ #main-toolbar #new-button { background-image: url(../icons/new-button.svg); } + +#main-toolbar #clear-button { + background-image: url(../images/clear.svg); +} diff --git a/index.html b/index.html index de1f4c8..5ddcea4 100644 --- a/index.html +++ b/index.html @@ -15,10 +15,8 @@
+ -
From ceec4aa434297599cbf588626924f66ca5eb5004 Mon Sep 17 00:00:00 2001 From: Dipansh Khandelwal Date: Tue, 26 Dec 2017 02:40:40 +0530 Subject: [PATCH 3/3] Changed clear icon color Clear icon color was too dark now changed to a light one --- images/clear.svg | 140 ++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 114 insertions(+), 26 deletions(-) diff --git a/images/clear.svg b/images/clear.svg index 63712d8..4316a3a 100644 --- a/images/clear.svg +++ b/images/clear.svg @@ -1,27 +1,115 @@ - - - - -Created by potrace 1.15, written by Peter Selinger 2001-2017 - - - - - - - + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + +