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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quick fix - allow relayout array elements #1133

Merged
merged 3 commits into from
Nov 10, 2016
Merged

Conversation

alexcjohnson
Copy link
Collaborator

@bpostlethwaite @etpinard

@etpinard 's fix https://github.com/plotly/streambed/pull/8378/commits/6a74d87370ef2205cdd4a86eb8c4ab4a1332ecd0 will handle your exact case, but a more general cover for this issue (until we redo this whole mess of code!) is just to make the tests of p.parts not fail on integer parts.

Plotly.relayout(gd, {rando: [1, 2, 3]})
Plotly.relayout(gd, {'rando[1]': 45})
gd.layout.rando
 [1, 45, 3]

Copy link
Contributor

@etpinard etpinard left a comment

Choose a reason for hiding this comment

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

Nice and easy thanks!

Would you mind adding 1 (just 1 is fine) test case in here?

@@ -1961,6 +1961,7 @@ function _relayout(gd, aobj) {
else {
// check whether we can short-circuit a full redraw
// 3d or geo at this point just needs to redraw.
var pp1 = String(p.parts[1] || '');
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you move this new line above the check whether we can short-circuit comment?

@etpinard etpinard added status: reviewable bug something broken labels Nov 10, 2016
@etpinard etpinard added this to the v1.20.0 milestone Nov 10, 2016
@etpinard
Copy link
Contributor

💃

@alexcjohnson alexcjohnson merged commit c883e57 into master Nov 10, 2016
@alexcjohnson alexcjohnson deleted the fix-relayout-array branch November 10, 2016 21:10
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.

None yet

2 participants