refactor mouse actions, starting with panning