def METHOD_NAME(self, viewer, event, data_x, data_y, msg=True):
    camera = self.get_camera(viewer)
    if camera is None:
        # this viewer doesn't have a camera
        return False
    event.accept()
    x, y = self.get_win_xy(viewer)
    if event.state == 'move':
        dx, dy = x - self._start_x, self._start_y - y
        camera.pan_delta(dx, dy)
        self._start_x, self._start_y = x, y
        camera.calc_gl_transform()
    elif event.state == 'down':
        self._start_x, self._start_y = x, y
        ## if msg:
        ##     self.onscreen_message("Camera translate", delay=1.0)
    ## else:
    ##     self.onscreen_message(None)
    # TODO: need to get the updated pan position and set it in
    # viewer's settings without triggering a callback to the viewer
    # itself
    tup = camera.position.get()
    data_x, data_y = viewer.tform['data_to_native'].from_(tup[:2])
    viewer.update_widget()