

def draw(self):
    circle1 = self.canvas.circle(50, 50, 25)
    circle1.setAttr('fill', '#000')
    circle1.setAttrs({
        'cursor': 'move',
        'opacity': 0.6,
    })
    circle1.addListener('mouseup', self.onElementMouseup)
    circle1.addListener('mousemove', self.onElementMousemove)
    circle1.addListener('dblclick', self.onElementDblClick)
    circle1.addListener('contextmenu', self.onElementContextmenu)
    circle1.addListener('mousedown', self.onElementMousedown)
    self.elements.append(circle1)
    self.desc.append('Circle 1')
    circle2 = self.canvas.circle(100, 100, 25)
    circle2.setAttr('fill', '#000')
    circle2.setAttrs({
        'cursor': 'move',
        'opacity': 0.6,
    })
    circle2.addListener('mouseup', self.onElementMouseup)
    circle2.addListener('mousemove', self.onElementMousemove)
    circle2.addListener('dblclick', text.onElementDblClick)
    circle2.addListener('contextmenu', self.onElementContextmenu)
    circle2.addListener('mousedown', self.onElementMousedown)
    self.elements.append(circle2)
    self.desc.append('Circle 2')
    rect1 = self.canvas.rect(200, 100, 30, 30)
    rect1.setAttr('fill', '#000')
    rect1.addListener('mouseup', self.onElementMouseup)
    rect1.addListener('mousemove', self.onElementMousemove)
    rect1.addListener('dblclick', self.onElementDblClick)
    rect1.addListener('contextmenu', self.onElementContextmenu)
    rect1.addListener('mousedown', self.onElementMousedown)
    self.elements.append(rect1)
    self.desc.append('Rectangle 1')
    rect2 = self.canvas.rect(200, 150, 30, 30)
    rect2.setAttr('fill', '#000')
    rect2.addListener('mouseup', self.onElementMouseup)
    rect2.addListener('mousemove', self.onElementMousemove)
    rect2.addListener('dblclick', self.onElementDblClick)
    rect2.addListener('contextmenu', self.onElementContextmenu)
    rect2.addListener('mousedown', self.onElementMousedown)
    self.elements.append(rect2)
    self.desc.append('Rectangle 2')
    connection = self.canvas.connection(rect1, rect2)
    connection.addListener('mouseup', self.onElementMouseup)
    connection.addListener('mousemove', self.onElementMousemove)
    connection.addListener('dblclick', self.onElementDblClick)
    connection.addListener('contextmenu', self.onElementContextmenu)
    connection.addListener('mousedown', self.onElementMousedown)
    self.elements.append(connection)
    self.desc.append('Connection')
    ellipse = self.canvas.ellipse(200, 200, 25, 40)
    text = self.canvas.text(200, 200, 'ABC')
    set = self.canvas.set()
    set.add(ellipse)
    set.add(text)
    set.addListener('mousemove', self.onElementMousemove)
    self.elements.append(set)
    self.desc.append('Set')

dataset/ETHPy150Open pyjs/pyjs/examples/raphael/events.py Events.draw/VarMisuse@197/303 `self`->`text`