Added support for limiting the panning range