Skip to content

Skip BADNUM items in scatter select routine#1656

Merged
etpinard merged 3 commits into
masterfrom
select-skip-badnum
May 9, 2017
Merged

Skip BADNUM items in scatter select routine#1656
etpinard merged 3 commits into
masterfrom
select-skip-badnum

Conversation

@etpinard

@etpinard etpinard commented May 8, 2017

Copy link
Copy Markdown
Contributor

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 😄

etpinard added 2 commits May 8, 2017 17:41
- so that BADNUM items are not included in
  the 'plotly_selected' event data.
Comment thread src/traces/scatter/select.js Outdated

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

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

Labels

bug something broken

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