def __init__(self, controller):
super().__init__(controller, bg='white', width=1300, height=800)
self.controller = controller
self.node_id_to_node = {}
self.drag_item = None
self.start_position = [None]*2
self.start_pos_main_node = [None]*2
self.dict_start_position = {}
self.selected_nodes = set()
self.filepath = None
self.proj = 'Mercator'
self.ratio, self.offset = 1, (0, 0)
self.bind('<MouseWheel>', self.zoomer)
self.bind('<Button-4>', lambda e: self.zoomer(e, 1.3))
self.bind('<Button-5>', lambda e: self.zoomer(e, 0.7))
self.bind('<ButtonPress-3>', lambda e: self.scan_mark(e.x, e.y))
self.bind('<B3-Motion>', lambda e: self.scan_dragto(e.x, e.y, gain=1))
self.bind('<Enter>', self.drag_and_drop, add='+')
self.bind('<ButtonPress-1>', self.start_point_select_objects, add='+')
self.bind('<B1-Motion>', self.rectangle_drawing)
self.bind('<ButtonRelease-1>', self.end_point_select_nodes, add='+')
self.tag_bind('node', '<Button-1>', self.find_closest_node)
self.tag_bind('node', '<B1-Motion>', self.node_motion)
评论列表
文章目录