Centralize pan handling