Skip to content

Commit

Permalink
update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kecnry committed Jul 2, 2024
1 parent 5b7ca02 commit d1f0915
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
10 changes: 7 additions & 3 deletions jdaviz/configs/default/plugins/export/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ class Export(PluginTemplateMixin, ViewerSelectMixin, SubsetSelectMixin,
dataset_format_items = List().tag(sync=True)
dataset_format_selected = Unicode().tag(sync=True)

plugin_plot_selected_widget = Unicode().tag(sync=True) # copy of widget of the selected plugin_plot in case the parent plugin is not opened
# copy of widget of the selected plugin_plot in case the parent plugin is not opened
plugin_plot_selected_widget = Unicode().tag(sync=True)

plugin_plot_format_items = List().tag(sync=True)
plugin_plot_format_selected = Unicode().tag(sync=True)

Expand Down Expand Up @@ -440,10 +442,12 @@ def export(self, filename=None, show_dialog=None, overwrite=False,
filename = None

if not plot._plugin.is_active:
# force an update to the plot. This requires the plot to have set update_callback when instantiated
# force an update to the plot. This requires the plot to have set
# update_callback when instantiated
plot._update()

# create a copy of the widget shown off screen to enable rendering in case one was never created in the parent plugin
# create a copy of the widget shown off screen to enable rendering
# in case one was never created in the parent plugin
self.plugin_plot_selected_widget = f'IPY_MODEL_{plot.model_id}'

self.save_figure(plot, filename, filetype, show_dialog=show_dialog)
Expand Down
5 changes: 3 additions & 2 deletions jdaviz/configs/default/plugins/plot_options/plot_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -903,8 +903,9 @@ def _request_update_stretch_histogram(self, msg={}):
# its type
msg = {}

# NOTE: this method is separate from _update_stretch_histogram so that _update_stretch_histogram
# can be called manually (or from the update_callback on the Plot object itself) without going through
# NOTE: this method is separate from _update_stretch_histogram so that
# _update_stretch_histogram can be called manually (or from the
# update_callback on the Plot object itself) without going through
# the skip_if_no_updates_since_last_active check
self._update_stretch_histogram(msg)

Expand Down
3 changes: 2 additions & 1 deletion jdaviz/core/template_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -4751,7 +4751,8 @@ def _remove_data(self, label):
self._plugin.session.hub.broadcast(PluginPlotModifiedMessage(sender=self))

def _update(self):
# call the update callback, if it exists, on the parent plugin. This is useful for updating the plot when a plugin is inactive
# call the update callback, if it exists, on the parent plugin.
# This is useful for updating the plot when a plugin is inactive.
if self._update_callback is not None:
self._update_callback()

Expand Down

0 comments on commit d1f0915

Please sign in to comment.