Solved the transition animation in gallery