adjust frame size of canvas