mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-12 22:54:50 +08:00
ENH: Draw new line when click is far from handle
This commit is contained in:
@@ -55,6 +55,10 @@ class LineTool(CanvasToolBase):
|
||||
idx, px_dist = self._handles.closest(event.x, event.y)
|
||||
if px_dist < self.maxdist:
|
||||
self._active_pt = idx
|
||||
else:
|
||||
self._active_pt = 0
|
||||
x, y = event.xdata, event.ydata
|
||||
self.end_pts = np.array([[x, y], [x, y]])
|
||||
|
||||
def on_mouse_release(self, event):
|
||||
if event.button != 1:
|
||||
|
||||
Reference in New Issue
Block a user