()
| 75 | |
| 76 | // Create Canvas |
| 77 | function createCanvas() { |
| 78 | canvas.width = window.innerWidth; |
| 79 | canvas.height = window.innerHeight - 50; |
| 80 | context.fillStyle = bucketColor; |
| 81 | context.fillRect(0, 0, canvas.width, canvas.height); |
| 82 | body.appendChild(canvas); |
| 83 | switchToBrush(); |
| 84 | } |
| 85 | |
| 86 | // Clear Canvas |
| 87 | clearCanvasBtn.addEventListener('click', () => { |