Skip to content

Commit

Permalink
Fix small issue with Jupyter image exporter.
Browse files Browse the repository at this point in the history
  • Loading branch information
Carifio24 committed Nov 27, 2024
1 parent 8ca9e7e commit cff540c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions glue_plotly/html_exporters/jupyter/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,15 @@ def on_cancel():
layer_condition=lambda layer: layer.state.visible and layer.enabled and layer in scatter_layers
)

dialog = \
self.save_hover_dialog = \

Check warning on line 35 in glue_plotly/html_exporters/jupyter/image.py

View check run for this annotation

Codecov / codecov/patch

glue_plotly/html_exporters/jupyter/image.py#L35

Added line #L35 was not covered by tests
JupyterSaveHoverDialog(data_collection=dc_hover,
checked_dictionary=None,
display=True,
on_cancel=on_cancel,
on_export=self.open_file_dialog)
self.checked_dictionary = dialog.checked_dictionary

with self.viewer.output_widget:
display(dialog)
display(self.save_hover_dialog)

Check warning on line 43 in glue_plotly/html_exporters/jupyter/image.py

View check run for this annotation

Codecov / codecov/patch

glue_plotly/html_exporters/jupyter/image.py#L42-L43

Added lines #L42 - L43 were not covered by tests
else:
self.checked_dictionary = None

Check warning on line 45 in glue_plotly/html_exporters/jupyter/image.py

View check run for this annotation

Codecov / codecov/patch

glue_plotly/html_exporters/jupyter/image.py#L45

Added line #L45 was not covered by tests

Expand Down Expand Up @@ -71,7 +70,7 @@ def save_figure(self, filepath):
traces_to_add = traces(self.viewer,
secondary_x=secondary_x,
secondary_y=secondary_y,
hover_selections=self.checked_dictionary,
hover_selections=self.save_hover_dialog.checked_dictionary,
add_data_label=add_data_label)
fig.add_traces(traces_to_add)

Expand Down

0 comments on commit cff540c

Please sign in to comment.