| 15 | self.odx, self.ody = 0, 0 |
| 16 | |
| 17 | def mouse_down(self, ips, x, y, btn, **key): |
| 18 | lim = 5.0/key['canvas'].get_scale() |
| 19 | if btn==1: |
| 20 | if ips.roi!=None: |
| 21 | self.curobj = ips.roi.pick(x, y, ips.cur, lim) |
| 22 | ips.roi.info(ips, self.curobj) |
| 23 | if self.curobj!=None:return |
| 24 | if not isinstance(ips.roi, pointroi.PointRoi): |
| 25 | ips.roi = pointroi.PointRoi() |
| 26 | if not key['shift']:del ips.roi.body[:] |
| 27 | ips.roi.add((x,y,ips.cur)) |
| 28 | self.curobj = ips.roi.pick(x, y, ips.cur, lim) |
| 29 | ips.update() |
| 30 | self.odx, self.ody = x, y |
| 31 | |
| 32 | def mouse_up(self, ips, x, y, btn, **key): |
| 33 | self.curobj = None |