added function to align canvas on pivot