context.clearRect(0,0,width, height)
это все, что вам нужно =)
Имейте в виду, что вы можете использовать CSS-стили для объекта canvas.
canvas.style.position = "absolute";
canvas.style.left = the x position of the div you're going over +"px";
canvas.style.top = the y position of the div you're going over + "px";