Update to automatically compute diagram boundaries