Created example for how to do smooth animations with all edge cases in the horizontal
direction handled