From a32a4d2a8b0891b01cf6ad7c69e442f8fac564fb Mon Sep 17 00:00:00 2001 From: Hendrik Langer Date: Thu, 6 Aug 2020 14:10:54 +0200 Subject: [PATCH] clear canvas text correctly --- raspberry/roberto/views/frontend/templates/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/raspberry/roberto/views/frontend/templates/index.html b/raspberry/roberto/views/frontend/templates/index.html index 831619c..4a9e776 100644 --- a/raspberry/roberto/views/frontend/templates/index.html +++ b/raspberry/roberto/views/frontend/templates/index.html @@ -174,7 +174,7 @@ socket.on('battery', (data) => { var ctx = canvas.getContext("2d"); ctx.font = "14px Arial"; ctx.fillStyle = "blue"; - ctx.clearRect(3*canvas.width/4, 30, canvas.width/4, 24); + ctx.clearRect(3*canvas.width/4, 0, canvas.width/4, 30); ctx.fillText(data, 3*canvas.width/4, 30); });