Browse Source

clear canvas

main
Hendrik Langer 4 years ago
parent
commit
e679c15e56
  1. 1
      raspberry/roberto/views/frontend/templates/index.html

1
raspberry/roberto/views/frontend/templates/index.html

@ -174,6 +174,7 @@ socket.on('battery', (data) => {
var ctx = canvas.getContext("2d"); var ctx = canvas.getContext("2d");
ctx.font = "14px Arial"; ctx.font = "14px Arial";
ctx.fillStyle = "blue"; ctx.fillStyle = "blue";
ctx.clearRect(3*canvas.width/4, 30, canvas.width/4, 24);
ctx.fillText(data, 3*canvas.width/4, 30); ctx.fillText(data, 3*canvas.width/4, 30);
}); });

Loading…
Cancel
Save