Added an ability to specify a custom view for panning.