MCPcopy Create free account
hub / github.com/Image-Py/imagepy / on_ld

Method on_ld

imagepy/ui/widgets/viewport.py:49–56  ·  view source on GitHub ↗
(self, event)

Source from the content-addressed store, hash-verified

47 wx.BufferedPaintDC(self, self.buffer)
48
49 def on_ld(self, event):
50 x, y = event.GetX(), event.GetY()
51 x = 1.0*(x-self.offx)/self.imgw
52 y = 1.0*(y-self.offy)/self.imgh
53 if x<0 or x>1 or y<0 or y>1:return
54 self.loc = (x*self.ibox[0], y*self.ibox[1])
55 self.handle()
56 self.drag = True
57
58 def on_lu(self, event):
59 self.drag = False

Callers

nothing calls this directly

Calls 1

handleMethod · 0.95

Tested by

no test coverage detected