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/images/clear.svg b/images/clear.svg new file mode 100644 index 0000000..4316a3a --- /dev/null +++ b/images/clear.svg @@ -0,0 +1,115 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + diff --git a/index.html b/index.html index 88e80ac..5ddcea4 100644 --- a/index.html +++ b/index.html @@ -15,6 +15,7 @@
+
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(); + }); + }); });