Moved around panTo so that it gets called after xhr response