-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
More comprehensive docs for ol.DeviceOrientation #978
Conversation
Adding an extended class description of DeviceOrientation along with some additional details in the property accessors.
@@ -91,7 +138,8 @@ ol.DeviceOrientation.prototype.orientationChange_ = function(browserEvent) { | |||
|
|||
|
|||
/** | |||
* @return {number|undefined} alpha. | |||
* @return {number|undefined} alpha The alpha value of the DeviceOrientation, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the parameter name alpha
here is unnecessary. The return should just be the {type}
followed by A complete sentence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we just use {type} followed by {A complete sentence} everywhere else.
Awesome. Curious to see what the effect of the |
I see that We're not consistent in the rest of the library, but my preference would be to avoid the extra annotation as it will likely be forgotten in other docs. But we could decide to get consistent and change this across the board in a separate issue. |
This is a really great addition @pagameba. Thanks for the effort. If you get a chance, I do think the generated docs are nicer without the unnecessary parameter name in the return. Either way, it's is certainly worth merging. |
+1 from me for this change. |
This removes @Class and fixes the return type pattern to match the project standard. There are a couple of minor changes to the text as well.
I'm ambivalent about the use of @Class, if I had an opinion I would say its a bit nicer to have the class-level stuff before the constructor but I will follow whatever you guys decide is the best pattern. If you want to remove @Class, I can do a pull request to make it consistent through the rest of the docs. Last commit removes @Class and fixes the pattern for the return types, sorry about that I was thinking of @param when I did it. I also tweaked the text in a couple of places. |
Another commit, this one adds the inline link I wanted near the beginning of the class documentation. I'm still not sure I like this without @Class. Comments? |
More comprehensive docs for ol.DeviceOrientation
Proposing an extended class description of DeviceOrientation along with
some additional details in the property accessors. Travis is running
its extensive tests, but it passes local linting and doc generation.