If there are elements, then it performs an exit animation, otherwise an entrance animation.