Skip to content

fix to allow you to add fake selections #7164

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

Merged
merged 2 commits into from
Sep 19, 2024
Merged

Conversation

alexcjohnson
Copy link
Collaborator

This is useful when you have selectedpoints (based on a different plot perhaps) but no selections, and you still want a doubleclick to clear selectedpoints and generate plotly_selected and plotly_relayout events.

Calling this a bugfix because before this change, an invalid selection object will throw an error here because we convert it to null in the supplyDefaults step:

if(
selection.x0 === undefined ||
selection.x1 === undefined ||
selection.y0 === undefined ||
selection.y1 === undefined
) {
layoutOut.selections[i] = null;
}

@alexcjohnson alexcjohnson added the bug something broken label Sep 19, 2024
Copy link
Contributor

@archmoj archmoj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely done.
💃

@archmoj
Copy link
Contributor

archmoj commented Sep 19, 2024

@alexcjohnson could you please rebase it on top of 2.35.2 so that I could release it as part of upcoming 2.35.3?

this is useful when you have selectedpoints (based on a different plot perhaps) but no selections,
and you still want a doubleclick to clear selectedpoints and generate selected and relayout events.
@alexcjohnson alexcjohnson changed the base branch from master to release-v2.35.3 September 19, 2024 17:51
@archmoj archmoj merged commit 52975c3 into release-v2.35.3 Sep 19, 2024
1 check passed
@archmoj archmoj deleted the alex/fake-selections branch September 19, 2024 18:08
@archmoj archmoj restored the alex/fake-selections branch December 12, 2024 20:12
@archmoj archmoj deleted the alex/fake-selections branch December 12, 2024 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants