Skip to content

Commit

Permalink
Added JSDoc about components that exist for the life of the sim and h…
Browse files Browse the repository at this point in the history
…ence do not require a dispose implementation, see #317
  • Loading branch information
samreid committed Sep 5, 2017
1 parent 3e9e47b commit 991c5c7
Show file tree
Hide file tree
Showing 24 changed files with 42 additions and 22 deletions.
2 changes: 1 addition & 1 deletion js/model/ChargeAnimator.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* This code governs the movement of charges, making sure they are distributed equally among the different
* CircuitElements.
* CircuitElements. This exists for the life of the sim and hence does not need a dispose implementation.
*
* @author Sam Reid (PhET Interactive Simulations)
*/
Expand Down
2 changes: 1 addition & 1 deletion js/model/Circuit.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* A collection of circuit elements in the play area, not necessarily connected. (For instance it could be 2 disjoint
* circuits).
* circuits). This exists for the life of the sim and hence does not need a dispose implementation.
*
* @author Sam Reid (PhET Interactive Simulations)
*/
Expand Down
3 changes: 2 additions & 1 deletion js/model/CircuitConstructionKitModel.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// Copyright 2015-2017, University of Colorado Boulder

/**
* Contains circuit, voltmeter, ammeter and properties to indicate what mode the model is in.
* Contains circuit, voltmeter, ammeter and properties to indicate what mode the model is in. This exists for the life
* of the sim and hence does not need a dispose implementation.
*
* @author Sam Reid (PhET Interactive Simulations)
*/
Expand Down
2 changes: 1 addition & 1 deletion js/model/Meter.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2016-2017, University of Colorado Boulder

/**
* Base class for Ammeter and Voltmeter
* Base class for Ammeter and Voltmeter. Meters for the life of the sim and hence do not need a dispose implementation.
*
* @author Sam Reid (PhET Interactive Simulations)
*/
Expand Down
2 changes: 2 additions & 0 deletions js/model/ModifiedNodalAnalysisCircuit.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
* Equations is solved as a linear system. Here is a good reference that was used during the development of this code
* https://www.swarthmore.edu/NatSci/echeeve1/Ref/mna/MNA2.html
*
* No listeners are attached and hence no dispose implementation is necessary.
*
* @author Sam Reid (PhET Interactive Simulations)
*/
define( function( require ) {
Expand Down
2 changes: 1 addition & 1 deletion js/model/ModifiedNodalAnalysisCircuitElement.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2017, University of Colorado Boulder

/**
* Circuit element used for Modified Nodal Analysis.
* Circuit element used for Modified Nodal Analysis. * No listeners are attached and hence no dispose implementation is necessary.
*
* @author Sam Reid (PhET Interactive Simulations)
*/
Expand Down
2 changes: 1 addition & 1 deletion js/model/ModifiedNodalAnalysisSolution.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2015-2017, University of Colorado Boulder

/**
* Sparse solution containing the solved variables from ModifiedNodalAnalysisCircuit
* Sparse solution containing the solved variables from ModifiedNodalAnalysisCircuit. * No listeners are attached and hence no dispose implementation is necessary.
*
* @author Sam Reid (PhET Interactive Simulations)
*/
Expand Down
3 changes: 2 additions & 1 deletion js/model/Voltmeter.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// Copyright 2016-2017, University of Colorado Boulder

/**
* The model for a voltmeter, which has a red and black probe and reads out voltage between vertices/wires.
* The model for a voltmeter, which has a red and black probe and reads out voltage between vertices/wires. Exists
* for the life of the sim and hence a dispose implementation is not needed.
*
* @author Sam Reid (PhET Interactive Simulations)
*/
Expand Down
2 changes: 1 addition & 1 deletion js/view/AmmeterNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/**
* The user interface component with a single probe which reads current values from Wires (not from Vertex or
* FixedCircuitElement instances).
* FixedCircuitElement instances). Exists for the life of the sim and hence does not require a dispose implementation.
*
* @author Sam Reid (PhET Interactive Simulations)
*/
Expand Down
3 changes: 2 additions & 1 deletion js/view/BatteryResistanceControl.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// Copyright 2017, University of Colorado Boulder

/**
* Controls for showing and changing the battery internal resistance.
* Controls for showing and changing the battery internal resistance. Exists for the life of the sim and hence does not
* require a dispose implementation.
*
* @author Sam Reid (PhET Interactive Simulations)
* @author Denzell Barnett (PhET Interactive Simulations)
Expand Down
3 changes: 2 additions & 1 deletion js/view/ChargeSpeedThrottlingReadoutNode.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// Copyright 2016-2017, University of Colorado Boulder

/**
* This shows a readout that indicates the speed of the simulation is reduced (to prevent a strobe effect).
* This shows a readout that indicates the speed of the simulation is reduced (to prevent a strobe effect). Exists for
* the life of the sim and hence does not require a dispose implementation.
*
* @author Sam Reid (PhET Interactive Simulations)
*/
Expand Down
3 changes: 2 additions & 1 deletion js/view/CircuitConstructionKitScreenView.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// Copyright 2015-2017, University of Colorado Boulder

/**
* Node that represents a single scene or screen, with a circuit, toolbox, sensors, etc.
* Node that represents a single scene or screen, with a circuit, toolbox, sensors, etc. Exists for the life of the sim
* and hence does not require a dispose implementation.
*
* @author Sam Reid (PhET Interactive Simulations)
*/
Expand Down
3 changes: 2 additions & 1 deletion js/view/CircuitElementToolFactory.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// Copyright 2016-2017, University of Colorado Boulder

/**
* Creates CircuitElementToolNodes that can be used to create CircuitElements from the toolbox.
* Creates CircuitElementToolNodes that can be used to create CircuitElements from the toolbox. Exists for the life of
* the sim and hence does not require a dispose implementation.
*
* @author Sam Reid (PhET Interactive Simulations)
*/
Expand Down
3 changes: 2 additions & 1 deletion js/view/CircuitElementToolNode.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// Copyright 2017, University of Colorado Boulder

/**
* An icon in the circuit element toolbox/carousel that can be used to create circuit elements.
* An icon in the circuit element toolbox/carousel that can be used to create circuit elements. Exists for the life of
* the sim and hence does not require a dispose implementation.
*
* @author Sam Reid (PhET Interactive Simulations)
*/
Expand Down
3 changes: 2 additions & 1 deletion js/view/CircuitElementToolbox.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// Copyright 2016-2017, University of Colorado Boulder

/**
* Toolbox from which CircuitElements can be dragged or returned.
* Toolbox from which CircuitElements can be dragged or returned. Exists for the life of the sim and hence does not
* require a dispose implementation.
*
* @author Sam Reid (PhET Interactive Simulations)
*/
Expand Down
2 changes: 2 additions & 0 deletions js/view/CircuitLayerNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
* socket (in z-ordering). The CircuitElementNode constructors populate different layers of the CircuitLayerNode in
* their constructors and depopulate in their dispose functions.
*
* Exists for the life of the sim and hence does not require a dispose implementation.
*
* @author Sam Reid (PhET Interactive Simulations)
* @author Denzell Barnett (PhET Interactive Simulations)
*/
Expand Down
3 changes: 2 additions & 1 deletion js/view/DisplayOptionsPanel.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// Copyright 2016-2017, University of Colorado Boulder

/**
* This control panel shows checkboxes for "Show Electrons", etc.
* This control panel shows checkboxes for "Show Electrons", etc. Exists for the life of the sim and hence does not
* require a dispose implementation.
*
* @author Sam Reid (PhET Interactive Simulations)
*/
Expand Down
3 changes: 2 additions & 1 deletion js/view/ProbeTextNode.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// Copyright 2016-2017, University of Colorado Boulder

/**
* Shows the title (above) and dynamic readout (below) for the ammeter and voltmeter.
* Shows the title (above) and dynamic readout (below) for the ammeter and voltmeter. Exists for the life of the sim
* and hence does not require a dispose implementation.
*
* @author Sam Reid (PhET Interactive Simulations)
*/
Expand Down
2 changes: 1 addition & 1 deletion js/view/RotateBatteryButton.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 2017, University of Colorado Boulder

/**
* Button that reverses a battery
* Button that reverses a battery.
*
* @author Sam Reid (PhET Interactive Simulations)
*/
Expand Down
4 changes: 3 additions & 1 deletion js/view/SensorToolbox.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Copyright 2016-2017, University of Colorado Boulder

/**
* This is the toolbox on the right hand side from which the voltmeter and ammeter can be dragged/dropped.
* This is the toolbox on the right hand side from which the voltmeter and ammeter can be dragged/dropped. Exists for
* the life of the sim and hence does not require a dispose implementation.
*
* @author Sam Reid (PhET Interactive Simulations)
*/
define( function( require ) {
Expand Down
3 changes: 2 additions & 1 deletion js/view/ViewRadioButtonGroup.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// Copyright 2017, University of Colorado Boulder

/**
* Radio buttons that allow the user to choose between Schematic and Lifelike views.
* Radio buttons that allow the user to choose between Schematic and Lifelike views. Exists for the life of the sim and
* hence does not require a dispose implementation.
*
* @author Sam Reid (PhET Interactive Simulations)
*/
Expand Down
3 changes: 2 additions & 1 deletion js/view/VoltmeterNode.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// Copyright 2016-2017, University of Colorado Boulder

/**
* Displays the Voltmeter, which has 2 probes and detects potential differences.
* Displays the Voltmeter, which has 2 probes and detects potential differences. Exists for the life of the sim and
* hence does not require a dispose implementation.
*
* @author Sam Reid (PhET Interactive Simulations)
*/
Expand Down
3 changes: 2 additions & 1 deletion js/view/WireResistivityControl.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// Copyright 2017, University of Colorado Boulder

/**
* Controls for showing and changing the wire resistivity.
* Controls for showing and changing the wire resistivity. Exists for the life of the sim and hence does not require a
* dispose implementation.
*
* @author Sam Reid (PhET Interactive Simulations)
*/
Expand Down
3 changes: 2 additions & 1 deletion js/view/ZoomControlPanel.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// Copyright 2017, University of Colorado Boulder

/**
* The panel that appears in the bottom left which can be used to zoom in and out on the circuit.
* The panel that appears in the bottom left which can be used to zoom in and out on the circuit. Exists for the life
* of the sim and hence does not require a dispose implementation.
*
* @author Sam Reid (PhET Interactive Simulations)
*/
Expand Down

0 comments on commit 991c5c7

Please sign in to comment.