Skip to content

Commit

Permalink
add documentation to methods (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
veillette committed Jul 29, 2021
1 parent 0102de2 commit 8e3b2a9
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 2 deletions.
2 changes: 2 additions & 0 deletions js/common/model/Optic.js
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,8 @@ class Optic {
}

/**
* get the bounds of the optically "active" component
* In practice, it means that we exclude the backing (fill) of the mirror
* @public
* @returns {Bounds2}
*/
Expand Down
2 changes: 2 additions & 0 deletions js/common/model/Ray.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@ class Ray extends Ray2 {

assert && assert( typeof options.length === 'number' );

// @public {number}
this.length = options.length;
}

/**
* Set the length of the ray
* @public
* @param {number} length
*/
Expand Down
2 changes: 2 additions & 0 deletions js/common/model/Ruler.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class Ruler {
}

/**
* is the ruler horizontal
* @public
* @returns {boolean}
*/
Expand All @@ -63,6 +64,7 @@ class Ruler {
}

/**
* is the ruler vertical
* @public
* @returns {boolean}
*/
Expand Down
4 changes: 2 additions & 2 deletions js/common/model/SourceObject.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,10 @@ class SourceObject {

const scale = representation.isObject ? OBJECT_SCALE_FACTOR : SOURCE_SCALE_FACTOR;

// update the value of the offset
// {Vector2} update the value of the offset
this.offsetPosition = representation.offsetPosition.dividedScalar( scale );

// update the left top position - the firstPosition is the ground truth when changing representation
// {Vector2} update the left top position - the firstPosition is the ground truth when changing representation
this.leftTopProperty.value = this.firstPositionProperty.value.plus( this.offsetPosition );
} );

Expand Down
3 changes: 3 additions & 0 deletions js/common/view/GeometricOpticsRulerNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ class GeometricOpticsRulerNode extends RulerNode {
}

/**
* dispose of the listeners on this ruler
* @public
*/
dispose() {
Expand All @@ -170,6 +171,7 @@ class GeometricOpticsRulerNode extends RulerNode {
}

/**
* set the orientation of the ruler
* @public
*/
setOrientation() {
Expand All @@ -181,6 +183,7 @@ class GeometricOpticsRulerNode extends RulerNode {
}

/**
* sets the position of the ruler
* @public
*/
setPosition() {
Expand Down
1 change: 1 addition & 0 deletions js/common/view/GeometricOpticsRulersLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ class GeometricOpticRulersLayer extends Node {
}

/**
* dispose function for the two ruler orientations
* @public
*/
disposeRulers() {
Expand Down
1 change: 1 addition & 0 deletions js/common/view/GeometricOpticsScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ class GeometricOpticsScreenView extends ScreenView {
}

/**
* time stepper
* @public
*/
step( dt ) {
Expand Down
1 change: 1 addition & 0 deletions js/common/view/SourceObjectNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ class SourceObjectNode extends Node {
}

/**
* reset this node
* @public
*/
reset() {
Expand Down

0 comments on commit 8e3b2a9

Please sign in to comment.