Skip to content

Use Template.newContainer in polar axis defaults #3092

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

Merged
merged 1 commit into from
Oct 11, 2018
Merged

Conversation

etpinard
Copy link
Contributor

checking off the last item in #3055

cc @plotly/plotly_js

@etpinard etpinard added bug something broken status: reviewable labels Oct 10, 2018
// Note: does not need template propagation, since coerceAxis is still
// based on the subplot-wide coerce function. Though it may be more
// efficient to make a new coerce function, then we *would* need to
// propagate the template.
Copy link
Collaborator

Choose a reason for hiding this comment

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

huh, so was this comment wrong all along, or did something change since I wrote this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That comment was only partially correct/wrong.

We didn't have to propagate the templates for attributes getting coerced by the coerce function in the polar/layout_defaults.js scope, but we do need to for attributes getting coerced by coerce2 like here:

function coerce2(attr, dflt) {
return Lib.coerce2(containerIn, containerOut, opts.attributes, attr, dflt);
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

but we do need to for attributes getting coerced by coerce2 like here

Ah... there it is, thanks.

@alexcjohnson
Copy link
Collaborator

Very nice. Regardless of the answer to my question, 💃

@etpinard etpinard merged commit 1539fea into master Oct 11, 2018
@etpinard etpinard deleted the template-fixes branch October 11, 2018 13:47
@chriddyp chriddyp mentioned this pull request Oct 11, 2018
3 tasks
etpinard added a commit that referenced this pull request Oct 11, 2018
... Template.newContainer does that internally already.
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