Closed samreid closed 8 years ago
I fixed the example case above. Here is the new JSDoc:
/**
* @param {NeuronModel} neuronModel - the main model for the simulation
* @param {Property.<number>} zoomProperty - property that indicates how far zoomed in the simulation is, between
* - minZoom and maxZoom
* @param {number} minZoom - the furthest out the sim can be zoomed (1)
* @param {number} maxZoom - the furthest in the sim can be zoomed
* @constructor
*/
function ZoomControl( neuronModel, zoomProperty, minZoom, maxZoom ) {
Reassigning to @AshrafSharf to handle other cases, if any.
Added jsDoc annotations for missed classes
Thanks for adding this documentation, @AshrafSharf, it is looking much better. I am still seeing several places where method parameter types are not annotated. For example:
AxonMembrane.js
/**
* Evaluate the curve in order to locate a point given a distance along the curve. This uses the DeCasteljau
* algorithm.
*
* @param curve - The Curve Shape that is being evaluated.
* @param t - proportional distance along the curve from the first control point, must be from 0 to 1.
* @return point corresponding to the location of the curve at the specified distance.
*
* This method was converted from static to instance to prevent circular dependency between Traveling
* Potential and AxonMembrane (Ashraf)
*/
DelayBuffer.js
DelayBuffer.prototype = {
addValue: function( value, deltaTime ) {
And there are a few other places with missing @param type annotations. Can you take a look?
Done on master and on the 1.0 branch, closing.
The JSDoc is valuable to indicate the purpose and intended usage of each function. Some of the functions and constructors in neuron are missing type annotations and description of the function/constructor and the parameters. For instance, in ZoomControl.js the constructor is declared as such:
Please add the parameter types and a description for each. I'll fix this case shortly as a demonstration, but if there are other cases in the code that need improved JSDoc, they should be addressed. Discovered during #1.