From c551089c1cfafe1e97bcd878999abdfe65c9c280 Mon Sep 17 00:00:00 2001 From: Bruno Date: Thu, 25 Jul 2024 22:25:46 -0300 Subject: [PATCH] feat: added clear page button --- print/index.html | 1 + print/print.js | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/print/index.html b/print/index.html index b60b86e1..44a8be1a 100644 --- a/print/index.html +++ b/print/index.html @@ -211,6 +211,7 @@ style="text-align: center" /> +
diff --git a/print/print.js b/print/print.js index f1126ac7..56ce1107 100644 --- a/print/print.js +++ b/print/print.js @@ -160,6 +160,15 @@ function drawSheetReal() { } } +function clearSheet() { + const canvas = document.querySelector("canvas"); + + const context = canvas.getContext("2d"); + context.clearRect(0, 0, canvas.width, canvas.height); + + imageList = []; +} + function downloadCanvas() { var download = document.createElement("a"); download.download = "print.png";