| 62 | self.odx, self.ody = 0, 0 |
| 63 | |
| 64 | def mouse_down(self, ips, x, y, btn, **key): |
| 65 | if key['ctrl'] and key['alt']: |
| 66 | if isinstance(ips.mark, Coordinate): |
| 67 | ips.mark.report(ips.title) |
| 68 | return |
| 69 | lim = 5.0/key['canvas'].get_scale() |
| 70 | if btn==1: |
| 71 | if isinstance(ips.mark, Coordinate): |
| 72 | self.curobj = ips.mark.pick(x, y, lim) |
| 73 | if self.curobj!=None:return |
| 74 | if not isinstance(ips.mark, Coordinate): |
| 75 | ips.mark = Coordinate(unit=ips.unit) |
| 76 | elif not key['shift']: |
| 77 | ips.mark = Coordinate(unit=ips.unit) |
| 78 | ips.mark.add((x,y)) |
| 79 | self.curobj = ips.mark.pick(x,y, lim) |
| 80 | ips.update() |
| 81 | self.odx, self.ody = x, y |
| 82 | |
| 83 | def mouse_up(self, ips, x, y, btn, **key): |
| 84 | self.curobj = None |