

def updateCursor(self):
    dx = (self.p2.x - self.p1.x)
    dy = (self.p2.y - self.p1.y)
    if ((not self.moving) and (abs(dx) >= (MIN_SELECTION_FRACTION_X * (self.getXAxis().getAxisMax() - self.getXAxis().getAxisMin()))) and (abs(dy) >= (MIN_SELECTION_FRACTION_Y * (self.getYAxis().getAxisMax() - self.getYAxis().getAxisMin())))):
        self.getCurve(self.SELECTION_CURVE).setVisible(True)
        self.getCurve(self.SELECTION_CURVE).getSymbol().setSymbolType(SymbolType.BOX_CENTER)
        self.getCurve(self.SELECTION_CURVE).getSymbol().setBorderColor('gray')
        self.getCurve(self.SELECTION_CURVE).getSymbol().setBorderWidth(2)
        self.getCurve(self.SELECTION_CURVE).getSymbol().setModelWidth(abs(dx))
        self.getCurve(self.SELECTION_CURVE).getSymbol().setModelHeight(abs(dy))
        self.getCurve(self.SELECTION_CURVE).getPoint(0).setX(((self.p1.x + self.p2.x) / 2))
        self.getCurve(self.SELECTION_CURVE).getPoint(0).setY(((self.p1.y + self.p2.y) / 2))
    elif xMax.moving:
        if self.getCurve(self.SELECTION_CURVE).isVisible():
            self.getCurve(self.SELECTION_CURVE).setVisible(False)
        xMin = (self.getXAxis().getAxisMin() - dx)
        xMax = (self.getXAxis().getAxisMax() - dx)
        yMin = (self.getYAxis().getAxisMin() - dy)
        yMax = (self.getYAxis().getAxisMax() - dy)
        self.getXAxis().setAxisMin(xMin)
        self.getXAxis().setAxisMax(xMax)
        self.getYAxis().setAxisMin(yMin)
        self.getYAxis().setAxisMax(yMax)
    self.update()

dataset/ETHPy150Open anandology/pyjamas/examples/gcharttestapp/GChartExample24.py GChartExample24.updateCursor/VarMisuse@304/393 `self`->`xMax`