Skip to content

Commit

Permalink
Merge pull request #61 from Carifio24/dotplot-solara-fixes
Browse files Browse the repository at this point in the history
Update how traces are removed from dotplot layer artist
  • Loading branch information
Carifio24 authored May 8, 2024
2 parents 98f5e10 + fdb5ffe commit cec3610
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion glue_plotly/viewers/histogram/dotplot_layer_artist.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,13 @@ def _update_visual_attrs_for_trace(self, trace):
def _update_data(self):
old_dots = self._get_dots()
if old_dots:
self.view._remove_traces(old_dots)
with self.view.figure.batch_update():
for trace in old_dots:
self.view._remove_trace_index(trace)

dots = traces_for_layer(self.view, self.state, add_data_label=True)
for trace in dots:
trace.update(hoverinfo='all', unselected=dict(marker=dict(opacity=self.state.alpha)))
self._dots_id = dots[0].meta if dots else None
self.view.figure.add_traces(dots)

Expand Down

0 comments on commit cec3610

Please sign in to comment.