Skip to content

Commit

Permalink
Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
duytnguyendtn committed Oct 24, 2024
1 parent 844c721 commit 8403306
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions jdaviz/configs/default/plugins/virtual_observatory/vo_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,11 @@ def _toggle_viewer_pan_tracking(self, _=None):
self.vue_center_on_data()

def vue_center_on_data(self, event=None):
"""UI entrypoint for the manual viewer center button"""
"""
This vue method serves two purposes:
* UI entrypoint for the manual viewer center button
* Callback method for user panning (sub'ed to zoom_center_x/zoom_center_y)
"""
# If plugin is in "Manual" mode, we should never
# autocenter and potentially wipe the user's data
if not self.viewer_selected or self.viewer_selected == "Manual":
Expand All @@ -173,7 +177,6 @@ def center_on_data(self):
# mixin object not yet initialized
return


# gets the current viewer
viewer = self.viewer.selected_obj

Expand Down Expand Up @@ -210,7 +213,11 @@ def center_on_data(self):

@observe("waveband_selected", type="change")
def vue_query_registry_resources(self, _=None):
"""UI entrypoint for resource selection and manual resource refresh btn"""
"""
This vue method serves as UI entrypoint for two actions:
* Automatically fires when a waveband is selected
* The manual resource refresh btn
"""
self.query_registry_resources()

@with_spinner(spinner_traitlet="resources_loading")
Expand Down

0 comments on commit 8403306

Please sign in to comment.