Using the existence of the transitionend event object to determine if the animation completed

This way, the "stoppedEarly" parameter is not needed.