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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip BADNUM items in scatter select routine #1656

Merged
merged 3 commits into from
May 9, 2017
Merged

Conversation

etpinard
Copy link
Contributor

@etpinard etpinard commented May 8, 2017

closes #1648

This PR first replaces { x: false, y: false } scatter calcdata items with { x: BADNUM, y: BADNUM } as put forward in b5cd573 then makes sure to skip those BADNUM items (as opposed to casting them to numbers - see codepen in #1648) in the scatter select routine.

cc @alexcjohnson it would be nice to include this in 1.27.0 if you get the time to review it 馃槃

- so that BADNUM items are not included in
  the 'plotly_selected' event data.

if(x === BADNUM || y === BADNUM) {
continue;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I take it from this fix that polygon.contains fails for undefined inputs? I would think for future extensibility it would be better to fix it in there, so if either x or y is BADNUM it's not contained in any polygon.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call. Done in 80cee01

- also make sure that 'lasso' dragmode is tested
@alexcjohnson
Copy link
Collaborator

馃拑

@etpinard etpinard merged commit 87de776 into master May 9, 2017
@etpinard etpinard deleted the select-skip-badnum branch May 9, 2017 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

plotly_click and plotly_select buggy on scatter/markers plot
2 participants