Skip to content

Commit 8e85d45

Browse files
Matteo-itmcmchris
andauthored
Update examples/vibration-anomaly-detection/assets/app.js
Co-authored-by: Christopher Méndez <[email protected]>
1 parent 2b4b3ad commit 8e85d45

File tree

1 file changed

+2
-1
lines changed
  • examples/vibration-anomaly-detection/assets

1 file changed

+2
-1
lines changed

examples/vibration-anomaly-detection/assets/app.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ function drawPlot() {
2727
canvas.width = currentWidth;
2828
canvas.height = currentHeight;
2929
}
30-
30+
// Clear the canvas before drawing the new frame!
31+
ctx.clearRect(0, 0, currentWidth, currentHeight);
3132
// All grid lines (every 0.5) - same size
3233
ctx.strokeStyle = '#31333F99';
3334
ctx.lineWidth = 0.5;

0 commit comments

Comments
 (0)