adjust canvas size and position