Disable animation when view is not visible