'Set whether automatic range will only pan (not scale) the view.'

def setAutoPan(self, x=None, y=None):

    if (x is not None):
        self.state['autoPan'][0] = x
    if (y is not None):
        self.state['autoPan'][1] = y
    if (None not in [x, y]):
        self.updateAutoRange()
