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

Clear _inputDomain on cartesian axes with altered domains #3461

Merged
merged 1 commit into from
Jan 23, 2019

Conversation

etpinard
Copy link
Contributor

@etpinard etpinard commented Jan 22, 2019

... during Plotly.react diffing - fixes #3430

See now bug-free codepen: https://codepen.io/etpinard/pen/EraKjq

cc @plotly/plotly_js

@etpinard etpinard added bug something broken status: reviewable labels Jan 22, 2019
@@ -2954,6 +2954,11 @@ function getDiffFlags(oldContainer, newContainer, outerparts, opts) {
flags.rangesAltered[outerparts[0]] = 1;
}

// clear _inputDomain on cartesian axes with altered domains
if(AX_DOMAIN_RE.test(astr)) {
nestedProperty(newContainer, '_inputDomain').set(null);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This piece is the react equivalent to this block

else if(pleafPlus.match(AX_DOMAIN_RE)) {
nestedProperty(fullLayout, ptrunk + '._inputDomain').set(null);
}

called during relayout.

@antoinerg
Copy link
Contributor

Looks good to me! Nice fix 👌

@antoinerg
Copy link
Contributor

💃

@etpinard etpinard merged commit 8bdbf73 into master Jan 23, 2019
@etpinard etpinard deleted the fix-react-scaleanchor-domain-diff branch January 23, 2019 02:35
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.

react() + layout.grid
2 participants