From 3401d101f73285186c337dcf2f92f5e175ffb095 Mon Sep 17 00:00:00 2001 From: JUNO_OKYO <5250117+J2TEAM@users.noreply.github.com> Date: Mon, 17 Aug 2020 15:38:53 +0700 Subject: [PATCH] Add button to clear the whiteboard (#9795) --- public/offline.html | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/public/offline.html b/public/offline.html index 2e643a625..4cfafc244 100644 --- a/public/offline.html +++ b/public/offline.html @@ -67,6 +67,11 @@ margin-top: 30px; } + #btn-clear, .paletteSelector select { + height: 30px; + cursor: pointer; + } + .colors { z-index: 2; margin: 0 20px; @@ -176,6 +181,8 @@ + + @@ -334,6 +341,10 @@ render(palettes[activePalette]) } + document.getElementById('btn-clear').addEventListener('click', (e) => { + context.clearRect(0, 0, canvas.width, canvas.height); + }); + // Initialization when page is ready to load, runs once (function() { render(palettes[activePalette])