MCPcopy Create free account
hub / github.com/DeepLabCut/DeepLabCut / on_click

Method on_click

deeplabcut/gui/tracklet_toolbox.py:732–743  ·  view source on GitHub ↗
(self, event)

Source from the content-addressed store, hash-verified

730 self.slider.set_val(self.curr_frame)
731
732 def on_click(self, event):
733 if (
734 event.inaxes in (self.ax2, self.ax3)
735 and event.button == 1
736 and not any(line.contains(event)[0] for line in self.lines_x + self.lines_y)
737 ):
738 x = max(0, min(event.xdata, self.manager.nframes - 1))
739 self.update_vlines(x)
740 self.slider.set_val(x)
741 elif event.inaxes == self.ax1 and not self.scat.contains(event)[0]:
742 self.display_traces(only_picked=False)
743 self.clean_collections()
744
745 def clean_collections(self):
746 for coll in self.ax2.collections + self.ax3.collections + self.ax_slider.collections:

Callers

nothing calls this directly

Calls 3

update_vlinesMethod · 0.95
display_tracesMethod · 0.95
clean_collectionsMethod · 0.95

Tested by

no test coverage detected