avoid copy paste
check if view is really visible before rendering