Skip to content

Fix scattergl selectedpoints clearance under select/lasso drag modes - #2492

Merged
etpinard merged 3 commits into
masterfrom
scattergl-dry-convert
Mar 26, 2018
Merged

Fix scattergl selectedpoints clearance under select/lasso drag modes#2492
etpinard merged 3 commits into
masterfrom
scattergl-dry-convert

Conversation

@etpinard

Copy link
Copy Markdown
Contributor

fixes a bug brought up by @cpsievert in #2298 (comment) - though this PR does not fix the entire issue.

I decided also to push two DRY-ing commits 🌴 , one of which we'll be used during the splom (see #2372) push.

cc @dfcreative

@etpinardetpinard mentioned this pull request Mar 23, 2018
@etpinard

Copy link
Copy Markdown
ContributorAuthor

@dfcreative can you review this PR please?

@etpinard

Copy link
Copy Markdown
ContributorAuthor

All right - merging this.

@etpinard
etpinard merged commit 7316d98 into masterMar 26, 2018
@etpinard
etpinard deleted the scattergl-dry-convert branch March 26, 2018 19:41
var symbolNoDot = !!Drawing.symbolNoDot[symbolNumber % 100];
var symbolNoFill = !!Drawing.symbolNoFill[symbolNumber % 100];

var isDot = constants.DOT_RE.test(symbol);

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 know this isn't new here, just noticing it: this won't work if symbol is provided by number in the first place. Better to just test the number once we have it - ie isDot = symbolNumber >= 200 (and for isOpenisOpen = (symbolNumber % 200) >= 100 - perhaps we should make these into helper functions in the Drawing module?). Probably not a very well-known feature, but it is supported by SVG, and could be useful particularly for symbol arrays, as you could use a typed array.

Dunno if anyone would use both names and numbers in the same plot, but if they did, it would also help to key the SYMBOL_SDF cache off the number.

@etpinardetpinardMar 26, 2018

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Good eye. This probably deserves an issue of its own.


if(subTypes.hasMarkers(trace)) {
opts.marker = convertMarkerStyle(trace);
opts.selected = convertMarkerSelection(trace, trace.selected);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In some reason trace.selected is empty here for multiple colors/multiple opacities #2500

@etpinardetpinardMar 26, 2018

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Ok - I'll take a look at this tomorrow

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugsomething broken

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@etpinard@dy@alexcjohnson