-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal for a toggle setting for mouseover marker #9
Conversation
in all the configurations supported by Jdaviz.
when out of bounds.
spec1d mouseover. Also remove unnecessary re-computation in the internals. A new internal cache on app level is introduced.
* only used in spectrum profile viewers * currently ALWAYS on
(or default tool - slice in cubeviz, for example)
* including clearing cache when subset is changed and ignoring hidden layers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am beginning to like this place for the switch more and more (and might even prefer it to eventually moving it to a "markers" plugin). Thanks!
# 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we want only the marker to be toggled, but still show the information in the panel. So self.label_mouseover.marks[self._reference_id].visible = plot_options_plugin.show_mouseover_marker
somewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the only place where we assign the LHS of the above snippet to True is here:
self.label_mouseover.marks[self._reference_id].visible = True |
so I'll change that True
to plot_options_plugin.show_mouseover_marker
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right. Alternatively, the switch could act as the current locking_active
(but probably renamed), and the text in the plugin changed to reflect that. That actually would probably be my vote (the switch controls both the marker AND exposing the coordinates of the nearest spectrum, but the mouse position is always exposed).
@@ -19,6 +19,14 @@ | |||
persistent-hint | |||
></v-switch> | |||
</v-row> | |||
<v-row> | |||
<v-switch v-if="config=='specviz'" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cubeviz and mosviz also have spectral viewers, so I think we want the switch there as well.
<v-switch v-if="config=='specviz'" | |
<v-switch v-if="['specviz', 'cubeviz', 'mosviz'].indexOf(config) !== -1" | |
If we move forward in this direction, I think we'll probably also want to consider removing the |
9d06095
to
18c9d34
Compare
spacetelescope#1894 is merged, so I am closing this here. Feel free to resubmit this patch as PR straight to Jdaviz. Thanks! |
Description
After sprint planning today, @kecnry and I discussed some ideas for how to toggle the mouseover marker and coordinate info. We talked about some of the difficulties with adding a new button to the toolbar, and decided we might scope out alternatives first.
This PR is a small addition to spacetelescope#1894 which toggles the mouseover marker and coordinate info with a switch in the Plot Options plugin, under the Settings drop-down. Demo below:
JDAT-3038.mov
I decided to contribute this suggestion as a PR to @pllim's PR, since (1) it depends on @pllim's implementation in spacetelescope#1894, and (2) it has a pretty small diff. Happy to make a PR to base:spacetelescope/jdaviz if that's better.
🐱
Change log entry
CHANGES.rst
? If you want to avoid merge conflicts,list the proposed change log here for review and add to
CHANGES.rst
before merge. If no, maintainershould add a
no-changelog-entry-needed
label.Checklist for package maintainer(s)
This checklist is meant to remind the package maintainer(s) who will review this pull request of some common things to look for. This list is not exhaustive.
trivial
label.