Moved common code to create start and end rect animation which out/in left/right use