Fix animation on pan and zoom.