Skip to content

Commit

Permalink
Update selectedpoints property in response to selection events
Browse files Browse the repository at this point in the history
  • Loading branch information
jonmmease committed Mar 8, 2019
1 parent 211af3f commit 675633e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions plotly/basedatatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -4117,6 +4117,13 @@ def _dispatch_on_selection(self,
"""
Dispatch points and selector info to selection callbacks
"""
if 'selectedpoints' in self:
# Update the selectedpoints property, which will notify all views
# of the selection change. This is a special case because no
# restyle event is emitted by plotly.js on selection events
# even though these events update the selectedpoints property.
self.selectedpoints = points.point_inds

for callback in self._select_callbacks:
callback(self, points, selector)

Expand Down

0 comments on commit 675633e

Please sign in to comment.