updating autopan handling logic.