I was trying to move object drawn in canvas using the OOP concept. Basically, there is a square within the canvas.
Class Canvas has properties canvas
Class Canvas
canvas