code: def kp_pan_set(self, viewer, event, data_x, data_y, msg=True):
          
          if self.canpan:
              self._panset(viewer, data_x, data_y, msg=msg)
          return True
docs: Sets the pan position under the cursor.