To play around with HTML5 canvas, I decided to make an app which draws an analogue clockface. Everything\'s fine, except that old lines don\'t get erased in the way that I w
A quick and easy way to clear a canvas is to set the width:
context.canvas.width = context.canvas.width;