updated canvas.resize to align elements