Added logic to the input handler for panning and disabling input