resize the canvas according to the maze size