Made isPanning view specific

isPanning was being set as a global variable, so setting a non panning keyboard handler would break panning keyboard handlers.