Added basic panning functionality