leaflet: Hide children on transition end only when folded
Hides the last visible child at the end of an animation only if the leaflet is folded. This avoids children to become incorrectly invisible at the end of the transition when the leaflet is unfolded.