(self, x, y)
| 54 | self.dirty = False |
| 55 | |
| 56 | def pick(self, x, y): |
| 57 | if abs(y-10)>3:return -1 |
| 58 | dis = np.abs(np.array(self.pts)[:,0]-x) |
| 59 | if dis.min() > 3: return -1 |
| 60 | return np.argmin(dis) |
| 61 | |
| 62 | def on_ld(self, event): |
| 63 | x,y = event.GetX()-self.offset[0], event.GetY()-self.offset[1] |