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

Improve heatmap documentation. #859

Merged
merged 2 commits into from
Jul 12, 2018
Merged

Improve heatmap documentation. #859

merged 2 commits into from
Jul 12, 2018

Conversation

manthey
Copy link
Contributor

@manthey manthey commented Jul 9, 2018

This also removes a utility function that is also handled in a proper utils method.

This also removes a utility function that is also handled in a proper
utils method.
@manthey manthey force-pushed the update-heatmap-docs branch from c6157a5 to 28aeffb Compare July 10, 2018 15:33
* @protected
* Initialize.
*
* @returns {this}
*/
this._init = function () {
Copy link
Member

Choose a reason for hiding this comment

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

I guess we do not take spec for heatMap? Also, looks like we do not have arg passed here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The args are passed when we create the feature. They aren't repassed to _init. It works out the same, but is a different code format from other features.

Copy link
Member

Choose a reason for hiding this comment

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

I see, so the arg to s_init would be meaningless (not looking at the code right now)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It will be the arg that was passed when creating the feature, so it is used. It just has a different scope.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When the feature is instantiated, we call m_this._init(arg);, where arg doesn't get used as passed, since the canvas _init doesn't take it. The canvas's _init then calls s_init with the feature-scoped arg (rather than the function scoped arg).

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 agree that this is inconsistent with other features, but this feature, in general, has some inconsistencies (styles have to be values rather than values or functions, for instance). I was mostly trying to update the documentation in this PR. Other improvements should be separate PRs.

Copy link
Member

Choose a reason for hiding this comment

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

I see, yes the arg is passed to the feature will be used. Thanks, I understand the original intent. Should we create an issue to make this feature consistent just so that we do not forget it? I am fine with fixing it in some other PR as that work is orthogonal to this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See issue #865.

Copy link
Member

Choose a reason for hiding this comment

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

thanks!

Copy link
Member

@aashish24 aashish24 left a comment

Choose a reason for hiding this comment

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

thanks. it is good that we are finding issue while updating the documentation, this really helps in making sure we are consistent.

@manthey
Copy link
Contributor Author

manthey commented Jul 12, 2018

Yes. Documenting things is a powerful way to find and fix issues.

@manthey manthey merged commit 43736de into master Jul 12, 2018
@manthey manthey deleted the update-heatmap-docs branch July 12, 2018 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants