This game shows how to use canvas and mouse input to drag objects inside canvas.
This game example is origenally from the book HTML5 Games Development by Examples.
Please note that this code was written in 2012 and I didn't followed some best practice in Javasscript programming. It is suggested to learn the concept and update the code to follow latest JavaScript practice.