dynamic group-heading setting according to viewport