diff --git a/CHANGES.rst b/CHANGES.rst index 3363301911..dde4d30967 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -23,7 +23,7 @@ New Features - Plugin APIs now include a ``close_in_tray()`` method. [#2562] -- Convert the layer select dropdown in Plot Options into a horizontal panel of buttons. [#2566] +- Convert the layer select dropdown in Plot Options into a horizontal panel of buttons. [#2566, #2574] Cubeviz ^^^^^^^ diff --git a/jdaviz/app.py b/jdaviz/app.py index 6320ce62bd..74ab5eaadb 100644 --- a/jdaviz/app.py +++ b/jdaviz/app.py @@ -283,6 +283,21 @@ def __init__(self, configuration=None, *args, **kwargs): # can reference their state easily since glue does not store viewers self._viewer_store = {} + # Add new and inverse colormaps to Glue global state. Also see ColormapRegistry in + # https://github.com/glue-viz/glue/blob/main/glue/config.py + new_cms = (['Rainbow', cm.rainbow], + ['Seismic', cm.seismic], + ['Reversed: Gray', cm.gray_r], + ['Reversed: Viridis', cm.viridis_r], + ['Reversed: Plasma', cm.plasma_r], + ['Reversed: Inferno', cm.inferno_r], + ['Reversed: Magma', cm.magma_r], + ['Reversed: Hot', cm.hot_r], + ['Reversed: Rainbow', cm.rainbow_r]) + for cur_cm in new_cms: + if cur_cm not in colormaps.members: + colormaps.add(*cur_cm) + # Parse the yaml configuration file used to compose the front-end UI self.load_configuration(configuration) @@ -333,21 +348,6 @@ def __init__(self, configuration=None, *args, **kwargs): self.hub.subscribe(self, SubsetUpdateMessage, handler=lambda msg: self._clear_object_cache(msg.subset.label)) - # Add new and inverse colormaps to Glue global state. Also see ColormapRegistry in - # https://github.com/glue-viz/glue/blob/main/glue/config.py - new_cms = (['Rainbow', cm.rainbow], - ['Seismic', cm.seismic], - ['Reversed: Gray', cm.gray_r], - ['Reversed: Viridis', cm.viridis_r], - ['Reversed: Plasma', cm.plasma_r], - ['Reversed: Inferno', cm.inferno_r], - ['Reversed: Magma', cm.magma_r], - ['Reversed: Hot', cm.hot_r], - ['Reversed: Rainbow', cm.rainbow_r]) - for cur_cm in new_cms: - if cur_cm not in colormaps.members: - colormaps.add(*cur_cm) - # Subscribe to messages that result in changes to the layers self.hub.subscribe(self, AddDataMessage, handler=self._on_layers_changed) diff --git a/jdaviz/app.vue b/jdaviz/app.vue index a2b9f8521e..2cff6119ba 100644 --- a/jdaviz/app.vue +++ b/jdaviz/app.vue @@ -451,22 +451,4 @@ a:active { font-weight: 500 !important; } -.suppress-scrollbar { - overflow-y: scroll; - scrollbar-width: none; /* Firefox */ - -ms-overflow-style: none; /* Internet Explorer 10+ */ -} -.suppress-scrollbar::-webkit-scrollbar { /* WebKit */ - width: 0; - height: 0; -} - -.layer-tab-selected { - background-color: rgba(0,0,0,0.1); -} - -.theme--dark .layer-tab-selected { - background-color: rgba(255,255,255,0.1); -} - diff --git a/jdaviz/components/plugin_layer_select_tabs.vue b/jdaviz/components/plugin_layer_select_tabs.vue index 480b0d7dfb..8647a04d92 100644 --- a/jdaviz/components/plugin_layer_select_tabs.vue +++ b/jdaviz/components/plugin_layer_select_tabs.vue @@ -1,11 +1,22 @@