implemented mouse panning with right mouse click and dragging