Skip to content

Commit

Permalink
tweak for upstream jdaviz bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
bmorris3 committed Sep 22, 2023
1 parent 14d6e27 commit 69dfe27
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lcviz/plugins/binning/binning.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,13 @@ def _live_update(self, event={}):
times = lc_time

for viewer_id, mark in self.marks.items():
viewer_ref = self.app.get_viewer_by_id(viewer_id).reference
if self.ephemeris_selected == 'No ephemeris':
visible = True
do_phase = viewer_ref != 'flux-vs-time'
# TODO: fix this to be general and not rely on ugly id
do_phase = viewer_id != 'lcviz-0'
else:
# TODO: try to fix flashing as traitlets update
visible = viewer_ref.split(':')[-1] == self.ephemeris_selected
visible = viewer_id.split(':')[-1] == self.ephemeris_selected
do_phase = False

if visible:
Expand Down
3 changes: 2 additions & 1 deletion lcviz/plugins/ephemeris/ephemeris.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,8 @@ def _on_component_rename(self, old_lbl, new_lbl):
if self._phase_viewer_id(old_lbl) in self.app.get_viewer_reference_names():
self.app._update_viewer_reference_name(
self._phase_viewer_id(old_lbl),
self._phase_viewer_id(new_lbl)
self._phase_viewer_id(new_lbl),
update_id=True
)

# update metadata entries so that they can be used for filtering applicable entries in
Expand Down

0 comments on commit 69dfe27

Please sign in to comment.