simplified canvas resizing