Skip to content

Conversation

etpinard
Copy link
Contributor

fixes #2500 by handling the case where marker.opacity is an array and no [un]selected attributes are set (more info here). To be merged in #2499 to not have to regenerate the baselines once in master.

cc @dfcreative @alexcjohnson

@etpinard etpinard added bug something broken status: reviewable labels Mar 27, 2018
"size": 20,
"opacity": [0.9, 0.8, 0.7, 1, 0.6, 0.8]
},
"selectedpoints": [1, 4, 2]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

On master, this gives

image

where selectedpoints is essentially ignored.


if(Array.isArray(trace.marker.opacity)) {
var mo = trace.marker.opacity;
opts.unselected.opacity = new Array(mo.length);
Copy link
Collaborator

Choose a reason for hiding this comment

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

what if trace.unselected.marker.opacity is already defined?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess that would override it. Good eye. Thanks!

},
"unselected": {
"marker": {
"opacity": 0
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Before this commit, this gave:

image

that is unselected.marker.opacity was overrode.

@alexcjohnson
Copy link
Collaborator

Looks great 💃

@etpinard etpinard merged commit 95b9f3e into point-cluster-dev Mar 27, 2018
@etpinard etpinard deleted the fix-unselected-mo-for-array-mo-traces branch March 27, 2018 18:41
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