I'm drawing a puzzle in HTML5 Canvas.
Full code so far is here: https://github.com/Integralist/HTML5-Image-Slider-Game
There is always one empty space and when the user clicks on a puzzle piece I move it into the empty space.
But when I do this, the puzzle displays a drop shadow, see below image.
Any ideas why this would happen? Is it because I'm drawing on top of content already within the canvas? Is the work-around to clear the canvas before drawing, and if so is there a way I can do this without having to re-draw all the other puzzle pieces as I'm not sure how best to do that.
UPDATE: I tried clearing the entire canvas and then drawing the puzzle piece into the empty space but it still was drawn with a drop shadow?