Skip to content

Commit

Permalink
Fix codestyle
Browse files Browse the repository at this point in the history
  • Loading branch information
javerbukh committed Nov 14, 2023
1 parent bf22850 commit 2de03cf
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions jdaviz/configs/default/plugins/plot_options/plot_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -929,29 +929,29 @@ def _viewer_is_image_viewer(self):
return isinstance(self.viewer.selected_obj, (ImvizImageView, CubevizImageView,
MosvizImageView, MosvizProfile2DView))

@observe('line_color_value', 'image_color_value')
def color_change_event(self, event):
# Do not run when Plot Options is being instantiated
if event['old'] is None:
return
layer_names = [x['label'] for x in self.layer_items]

if isinstance(self.layer_selected, list):
layers_select = self.layer_selected
else:
layers_select = [self.layer_selected]
for layer_select in layers_select:
self.layer_items[layer_names.index(layer_select)]['color'] = event['new']
self.send_state('layer_items')

@observe('layer_selected')
def layer_selected_change_event(self, event):
if event is None or event['old'] is None:
return
print("layer", self.layer_items, self.layer.items)

@observe('viewer_selected')
def viewer_selected_change_event(self, event):
if event is None or event['old'] is None:
return
print("viewer", self.layer_items, self.layer.items)
# @observe('line_color_value', 'image_color_value')
# def color_change_event(self, event):
# # Do not run when Plot Options is being instantiated
# if event['old'] is None:
# return
# layer_names = [x['label'] for x in self.layer_items]
#
# if isinstance(self.layer_selected, list):
# layers_select = self.layer_selected
# else:
# layers_select = [self.layer_selected]
# for layer_select in layers_select:
# self.layer_items[layer_names.index(layer_select)]['color'] = event['new']
# self.send_state('layer_items')
#
# @observe('layer_selected')
# def layer_selected_change_event(self, event):
# if event is None or event['old'] is None:
# return
# print("layer", self.layer_items, self.layer.items)
#
# @observe('viewer_selected')
# def viewer_selected_change_event(self, event):
# if event is None or event['old'] is None:
# return
# print("viewer", self.layer_items, self.layer.items)

0 comments on commit 2de03cf

Please sign in to comment.