Skip to content

Commit

Permalink
proposal for mouseover marker toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
bmorris3 committed Jan 18, 2023
1 parent 6cb7ff2 commit da4a704
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<v-switch v-if="config=='specviz'"
v-model="show_mouseover_marker"
label="Show mouseover marker"
hint="Whether to show a marker at the mouse position"
hint="Show a marker at the mouse position"
persistent-hint
></v-switch>
</v-row>
Expand Down
5 changes: 5 additions & 0 deletions jdaviz/configs/specviz/plugins/viewers.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ def on_mouse_or_key_event(self, data):
else: # pragma: no cover
return

# only handle mouseover markers if the setting is selected:
plot_options_plugin = self.jdaviz_app.get_tray_item_from_name('g-plot-options')
if not plot_options_plugin.show_mouseover_marker:
return

if data['event'] == 'mousemove':
if len(self.jdaviz_app.data_collection) < 1:
return
Expand Down

0 comments on commit da4a704

Please sign in to comment.