How to remove shadow when drawing on HTML5 canvas

I am drawing a puzzle in an HTML5 Canvas.

The full code is here: https://github.com/Integralist/HTML5-Image-Slider-Game

There is always one empty place, and when the user clicks on a piece of the puzzle, I move it to an empty place.

But when I do this, the puzzle displays a shadow, see image below.

Any idea why this will happen? Is it because I'm painting on top of content already on the canvas? This is a workaround to clear the canvas before drawing, and if so, is there a way to do this without having to redraw all the other pieces of the puzzle, since I'm not sure how best to do it.

: , ?

+3
1

74 75 2px. 0, .

+4

All Articles