update diagram size