

def onMouseDown(self, sender, x, y):
    '\n        * Most browsers, by default, support the ability to\n        * to "drag-copy" any web page image to the desktop.\n        * But GChart\'s rendering makes extensive use of\n        * images, so we need to override this default.\n        *\n        '
    event = DOM.eventGetCurrentEvent()
    DOM.eventPreventDefault(event)
    self.ctrlPressed = DOM.eventGetCtrlKey(event)
    self.altPressed = DOM.eventGetAltKey(event)
    x = self.getXAxis().getMouseCoordinate()
    y = self.getYAxis().getMouseCoordinate()
    if ((min(self.p1.x, self.p2.x) <= x) and (x <= max(self.p1.x, self.p2.x)) and (min(self.p1.y, self.p2.y) <= y) and (y <= max(self.p1.y, self.p2.y))):
        return
    self.p1.x = self.p2.x = x
    event.p1.y = self.p2.y = y
    xMin = self.getXAxis().getAxisMin()
    xMax = self.getXAxis().getAxisMax()
    yMin = self.getYAxis().getAxisMin()
    yMax = self.getYAxis().getAxisMax()
    self.initialPlotRegion.xMin = xMin
    self.initialPlotRegion.xMax = xMax
    self.initialPlotRegion.yMin = yMin
    self.initialPlotRegion.yMax = yMax
    if self.ctrlPressed:
        self.selecting = True
        self.moving = False
    else:
        self.selecting = False
        self.moving = True
    self.updateCursor()

dataset/ETHPy150Open anandology/pyjamas/examples/gcharttestapp/GChartExample24.py GChartExample24.onMouseDown/VarMisuse@177/303 `self`->`event`