| 33 | if self.moving : self.plg.preview(ips, self.para) |
| 34 | |
| 35 | def mouse_move(self, ips, x, y, btn, **key): |
| 36 | lim = 5.0/key['canvas'].get_scale() |
| 37 | if btn==None: |
| 38 | self.cursor = wx.CURSOR_CROSS |
| 39 | if isinstance(self.snap(x, y, lim), str): |
| 40 | self.cursor = wx.CURSOR_HAND |
| 41 | elif self.moving==True: |
| 42 | self.plg.lt+=x-self.ox |
| 43 | self.plg.rt+=x-self.ox |
| 44 | self.plg.bm+=y-self.oy |
| 45 | self.plg.tp+=y-self.oy |
| 46 | self.ox, self.oy = x, y |
| 47 | self.plg.count() |
| 48 | self.plg.dialog.reset() |
| 49 | ips.update() |
| 50 | elif self.moving != False: |
| 51 | print("scale_tol.ScaleTool.mouse_move") |
| 52 | if 'l' in self.moving:self.plg.lt = x |
| 53 | if 'r' in self.moving:self.plg.rt = x |
| 54 | if 't' in self.moving:self.plg.tp = y |
| 55 | if 'b' in self.moving:self.plg.bm = y |
| 56 | self.plg.count() |
| 57 | self.plg.dialog.reset() |
| 58 | ips.update() |
| 59 | |
| 60 | class Plugin(Filter): |
| 61 | modal = False |