add isAnimating flag