

def __init__(self, width=600, height=300):
    VerticalPanel.__init__(self)
    self.elements = []
    self.desc = []
    self.canvas = Raphael(width, height)
    self.canvas.addListener('mouseup', self.onCanvasMouseup)
    self.canvas.addListener('mousemove', self.onCanvasMousemove)
    self.canvas.addListener('dblclick', self.onCanvasDblClick)
    self.canvas.addListener('contextmenu', self.onCanvasContextmenu)
    self.canvas.addListener('mousedown', self.onCanvasMousedown)
    self.add(self.canvas)
    self.status = Label('Execute any events on the canvas!')
    self.add(self.status)

dataset/ETHPy150Open pyjs/pyjs/examples/raphael/events.py Events.__init__/original