Canvas tag not supported by your browser
In order to preserve the content drawn, we added a function that copies the frontCanvas onto the mainCanvas when the mouse button is released.