Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support to plotly_unselect event #1542

Merged
merged 5 commits into from
May 3, 2019
Merged

Adding support to plotly_unselect event #1542

merged 5 commits into from
May 3, 2019

Conversation

denphi
Copy link
Contributor

@denphi denphi commented May 1, 2019

When active selections are cleared using double-click interaction over a plotly plot, python objects are not updated properly. This code enables plotly_deselect events to update points properly

@jonmmease
Copy link
Contributor

jonmmease commented May 2, 2019

Thanks for the PR @denphi! This will be a really helpful addition. The code looks great. I'll test it out over the next few days and then merge it in for version 3.9.

@jonmmease jonmmease added this to the v3.9.0 milestone May 2, 2019
To Plotly.js None represents No selection active, while () represents
and active selection with not points selected.
@jonmmease
Copy link
Contributor

Great work @denphi! I made only one small adjustment, rather than setting the trace's selectedpoints property to () when plotly_deselect happens I set it to None. The reason is that plotly.js treats None to mean that no selection is active (and so no points are transparent) whereas () means that the selection mode is active but nothing is selected (and so all of the points are transparent).

Will merge when tests are green (all but plotlyjs_dev_build, which is known to be failing right now). Thanks again!

@jonmmease jonmmease merged commit e426a19 into plotly:master May 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants