diff --git a/CHANGES.rst b/CHANGES.rst index 6196f6a6dd..1d7aca0c39 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,9 @@ New Features ------------ +- Plots in plugins now include basic zoom/pan tools for Plot Options, + Imviz Line Profiles, and Imviz's aperture photometry. [#2498] + Cubeviz ^^^^^^^ diff --git a/jdaviz/app.vue b/jdaviz/app.vue index 5b08c49f28..1aeadbef48 100644 --- a/jdaviz/app.vue +++ b/jdaviz/app.vue @@ -360,7 +360,12 @@ a:active { text-decoration: none; } -.jdaviz-nested-toolbar { +.invert, .invert-if-dark.theme--dark { + filter: invert(1) saturate(1) brightness(100); + color: white; +} + +.jdaviz-nested-toolbar, .plugin-nested-toolbar { /* height of nested toolbar to match viewer toolbar height */ height: 42px; margin-right: 4px; @@ -371,12 +376,7 @@ a:active { filter: invert(1) saturate(1) brightness(100); } -.invert, .invert-if-dark.theme--dark { - filter: invert(1) saturate(1) brightness(100); - color: white; -} - -.jdaviz-nested-toolbar .v-btn { +.jdaviz-nested-toolbar .v-btn, .plugin-nested-toolbar .v-btn { height: 42px !important; border: none !important; min-width: 42px !important; @@ -394,6 +394,11 @@ a:active { background-color: #c75109 !important; } +.plugin-nested-toolbar .v-btn--active, .plugin-nested-toolbar .v-btn:focus { + /* semi-transparent active color (orange) */ + background-color: #c7510996 !important; +} + .v-divider.theme--dark { /* make the v-divider standout more */ border-color: hsla(0,0%,100%,.35) !important; diff --git a/jdaviz/components/plugin_plot.vue b/jdaviz/components/plugin_plot.vue index cdc9ac7ec7..f751c03f24 100644 --- a/jdaviz/components/plugin_plot.vue +++ b/jdaviz/components/plugin_plot.vue @@ -1,7 +1,9 @@ - diff --git a/jdaviz/components/toolbar_nested.py b/jdaviz/components/toolbar_nested.py index 67bdbec019..60ae60f0ad 100644 --- a/jdaviz/components/toolbar_nested.py +++ b/jdaviz/components/toolbar_nested.py @@ -65,10 +65,13 @@ def __init__(self, viewer, tools_nested, default_tool_priority=[]): self.default_tool_priority = default_tool_priority self._handle_default_tool() - for msg in (AddDataMessage, RemoveDataMessage, ViewerAddedMessage, ViewerRemovedMessage, - SpectralMarksChangedMessage): - self.viewer.hub.subscribe(self, msg, - handler=lambda _: self._update_tool_visibilities()) + # toolbars in the main app viewers need to respond to the data-collection, etc, + # but those in plugins do not + if hasattr(self.viewer, 'hub'): + for msg in (AddDataMessage, RemoveDataMessage, ViewerAddedMessage, ViewerRemovedMessage, + SpectralMarksChangedMessage): + self.viewer.hub.subscribe(self, msg, + handler=lambda _: self._update_tool_visibilities()) def _is_visible(self, tool_id): # tools can optionally implement self.is_visible(). If not NotImplementedError diff --git a/jdaviz/components/toolbar_nested.vue b/jdaviz/components/toolbar_nested.vue index ff06e7979f..d698ef5d84 100644 --- a/jdaviz/components/toolbar_nested.vue +++ b/jdaviz/components/toolbar_nested.vue @@ -4,8 +4,8 @@ {{ tooltip }}{{has_suboptions ? " [right-click for alt. tools]" : ""}} @@ -81,7 +81,7 @@ } -