Skip to content

Commit

Permalink
var -> const in require statements, use arrow function in define requ…
Browse files Browse the repository at this point in the history
…ire call, phetsims/tasks#1010
  • Loading branch information
zepumph committed Sep 19, 2019
1 parent 3a0489b commit d72fc95
Show file tree
Hide file tree
Showing 119 changed files with 1,008 additions and 1,008 deletions.
10 changes: 5 additions & 5 deletions js/common/GEEConstants.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
* @author John Blanco
* @author Aadish Gupta
*/
define( function( require ) {
define( require => {
'use strict';

// imports
var Color = require( 'SCENERY/util/Color' );
var geneExpressionEssentials = require( 'GENE_EXPRESSION_ESSENTIALS/geneExpressionEssentials' );
var ModelViewTransform2 = require( 'PHETCOMMON/view/ModelViewTransform2' );
var Vector2 = require( 'DOT/Vector2' );
const Color = require( 'SCENERY/util/Color' );
const geneExpressionEssentials = require( 'GENE_EXPRESSION_ESSENTIALS/geneExpressionEssentials' );
const ModelViewTransform2 = require( 'PHETCOMMON/view/ModelViewTransform2' );
const Vector2 = require( 'DOT/Vector2' );

// constants
var LENGTH_PER_TWIST = 340;// In picometers
Expand Down
4 changes: 2 additions & 2 deletions js/common/GEEQueryParameters.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
*
* @author John Blanco
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var geneExpressionEssentials = require( 'GENE_EXPRESSION_ESSENTIALS/geneExpressionEssentials' );
const geneExpressionEssentials = require( 'GENE_EXPRESSION_ESSENTIALS/geneExpressionEssentials' );

var GEEQueryParameters = QueryStringMachine.getAll( {

Expand Down
12 changes: 6 additions & 6 deletions js/common/model/AttachmentSite.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
* @author Mohamed Safi
* @author Aadish Gupta
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var geneExpressionEssentials = require( 'GENE_EXPRESSION_ESSENTIALS/geneExpressionEssentials' );
var inherit = require( 'PHET_CORE/inherit' );
var NumberProperty = require( 'AXON/NumberProperty' );
var Property = require( 'AXON/Property' );
var Range = require( 'DOT/Range' );
const geneExpressionEssentials = require( 'GENE_EXPRESSION_ESSENTIALS/geneExpressionEssentials' );
const inherit = require( 'PHET_CORE/inherit' );
const NumberProperty = require( 'AXON/NumberProperty' );
const Property = require( 'AXON/Property' );
const Range = require( 'DOT/Range' );

// constants
var ATTACHED_THRESHOLD = 10; // Threshold used to decide whether or not a biomolecule is attached, in picometers.
Expand Down
6 changes: 3 additions & 3 deletions js/common/model/BasePair.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
* @author Mohamed Safi
* @author Aadish Gupta
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var geneExpressionEssentials = require( 'GENE_EXPRESSION_ESSENTIALS/geneExpressionEssentials' );
var inherit = require( 'PHET_CORE/inherit' );
const geneExpressionEssentials = require( 'GENE_EXPRESSION_ESSENTIALS/geneExpressionEssentials' );
const inherit = require( 'PHET_CORE/inherit' );

// constants
var BASE_PAIR_WIDTH = 13; // In picometers. Not sure if this is close to real life, chosen to look decent in view.
Expand Down
14 changes: 7 additions & 7 deletions js/common/model/BioShapeUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@
* @author John Blanco
* @author Aadish Gupta
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var geneExpressionEssentials = require( 'GENE_EXPRESSION_ESSENTIALS/geneExpressionEssentials' );
var Matrix3 = require( 'DOT/Matrix3' );
var Random = require( 'DOT/Random' );
var Shape = require( 'KITE/Shape' );
var ShapeUtils = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/ShapeUtils' );
var Vector2 = require( 'DOT/Vector2' );
const geneExpressionEssentials = require( 'GENE_EXPRESSION_ESSENTIALS/geneExpressionEssentials' );
const Matrix3 = require( 'DOT/Matrix3' );
const Random = require( 'DOT/Random' );
const Shape = require( 'KITE/Shape' );
const ShapeUtils = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/ShapeUtils' );
const Vector2 = require( 'DOT/Vector2' );

var BioShapeUtils = {
/**
Expand Down
22 changes: 11 additions & 11 deletions js/common/model/DnaMolecule.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@
* @author John Blanco
* @author Aadish Gupta
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var AttachmentSite = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/AttachmentSite' );
var BasePair = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/BasePair' );
var DnaStrandPoint = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/DnaStrandPoint' );
var GEEConstants = require( 'GENE_EXPRESSION_ESSENTIALS/common/GEEConstants' );
var geneExpressionEssentials = require( 'GENE_EXPRESSION_ESSENTIALS/geneExpressionEssentials' );
var inherit = require( 'PHET_CORE/inherit' );
var Range = require( 'DOT/Range' );
var StubGeneExpressionModel = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/StubGeneExpressionModel' );
var Util = require( 'DOT/Util' );
var Vector2 = require( 'DOT/Vector2' );
const AttachmentSite = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/AttachmentSite' );
const BasePair = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/BasePair' );
const DnaStrandPoint = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/DnaStrandPoint' );
const GEEConstants = require( 'GENE_EXPRESSION_ESSENTIALS/common/GEEConstants' );
const geneExpressionEssentials = require( 'GENE_EXPRESSION_ESSENTIALS/geneExpressionEssentials' );
const inherit = require( 'PHET_CORE/inherit' );
const Range = require( 'DOT/Range' );
const StubGeneExpressionModel = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/StubGeneExpressionModel' );
const Util = require( 'DOT/Util' );
const Vector2 = require( 'DOT/Vector2' );

// constants

Expand Down
6 changes: 3 additions & 3 deletions js/common/model/DnaSeparation.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
* @author John Blanco
* @author Aadish Gupta
*/
define( function( require ) {
define( require => {
'use strict';

//modules
var geneExpressionEssentials = require( 'GENE_EXPRESSION_ESSENTIALS/geneExpressionEssentials' );
var inherit = require( 'PHET_CORE/inherit' );
const geneExpressionEssentials = require( 'GENE_EXPRESSION_ESSENTIALS/geneExpressionEssentials' );
const inherit = require( 'PHET_CORE/inherit' );

/**
*
Expand Down
6 changes: 3 additions & 3 deletions js/common/model/DnaStrandPoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
* @author John Blanco
* @author Aadish Gupta
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var geneExpressionEssentials = require( 'GENE_EXPRESSION_ESSENTIALS/geneExpressionEssentials' );
var inherit = require( 'PHET_CORE/inherit' );
const geneExpressionEssentials = require( 'GENE_EXPRESSION_ESSENTIALS/geneExpressionEssentials' );
const inherit = require( 'PHET_CORE/inherit' );

/**
* @param {number} xPos
Expand Down
12 changes: 6 additions & 6 deletions js/common/model/FlatSegment.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
* @author Mohamed Safi
* @author Aadish Gupta
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var GEEConstants = require( 'GENE_EXPRESSION_ESSENTIALS/common/GEEConstants' );
var geneExpressionEssentials = require( 'GENE_EXPRESSION_ESSENTIALS/geneExpressionEssentials' );
var inherit = require( 'PHET_CORE/inherit' );
var ShapeSegment = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/ShapeSegment' );
var SquareSegment = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/SquareSegment' );
const GEEConstants = require( 'GENE_EXPRESSION_ESSENTIALS/common/GEEConstants' );
const geneExpressionEssentials = require( 'GENE_EXPRESSION_ESSENTIALS/geneExpressionEssentials' );
const inherit = require( 'PHET_CORE/inherit' );
const ShapeSegment = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/ShapeSegment' );
const SquareSegment = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/SquareSegment' );

/**
* @param {Object} owner
Expand Down
26 changes: 13 additions & 13 deletions js/common/model/Gene.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@
* @author Mohamed Safi
* @author Aadish Gupta
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var AttachmentSite = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/AttachmentSite' );
var GEEConstants = require( 'GENE_EXPRESSION_ESSENTIALS/common/GEEConstants' );
var geneExpressionEssentials = require( 'GENE_EXPRESSION_ESSENTIALS/geneExpressionEssentials' );
var inherit = require( 'PHET_CORE/inherit' );
var PlacementHint = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/PlacementHint' );
var Property = require( 'AXON/Property' );
var RnaPolymerase = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/RnaPolymerase' );
var StubGeneExpressionModel = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/StubGeneExpressionModel' );
var TranscriptionFactor = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/TranscriptionFactor' );
var TranscriptionFactorAttachmentSite = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/TranscriptionFactorAttachmentSite' );
var TranscriptionFactorPlacementHint = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/TranscriptionFactorPlacementHint' );
var Vector2 = require( 'DOT/Vector2' );
const AttachmentSite = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/AttachmentSite' );
const GEEConstants = require( 'GENE_EXPRESSION_ESSENTIALS/common/GEEConstants' );
const geneExpressionEssentials = require( 'GENE_EXPRESSION_ESSENTIALS/geneExpressionEssentials' );
const inherit = require( 'PHET_CORE/inherit' );
const PlacementHint = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/PlacementHint' );
const Property = require( 'AXON/Property' );
const RnaPolymerase = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/RnaPolymerase' );
const StubGeneExpressionModel = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/StubGeneExpressionModel' );
const TranscriptionFactor = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/TranscriptionFactor' );
const TranscriptionFactorAttachmentSite = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/TranscriptionFactorAttachmentSite' );
const TranscriptionFactorPlacementHint = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/TranscriptionFactorPlacementHint' );
const Vector2 = require( 'DOT/Vector2' );

/**
* @param {DnaMolecule} dnaMolecule - The DNA molecule within which this gene exists.
Expand Down
16 changes: 8 additions & 8 deletions js/common/model/GeneA.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
* @author Mohamed Safi
* @author Aadish Gupta
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var Color = require( 'SCENERY/util/Color' );
var Gene = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/Gene' );
var geneExpressionEssentials = require( 'GENE_EXPRESSION_ESSENTIALS/geneExpressionEssentials' );
var inherit = require( 'PHET_CORE/inherit' );
var ProteinA = require( 'GENE_EXPRESSION_ESSENTIALS/manual-gene-expression/model/ProteinA' );
var Range = require( 'DOT/Range' );
var TranscriptionFactor = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/TranscriptionFactor' );
const Color = require( 'SCENERY/util/Color' );
const Gene = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/Gene' );
const geneExpressionEssentials = require( 'GENE_EXPRESSION_ESSENTIALS/geneExpressionEssentials' );
const inherit = require( 'PHET_CORE/inherit' );
const ProteinA = require( 'GENE_EXPRESSION_ESSENTIALS/manual-gene-expression/model/ProteinA' );
const Range = require( 'DOT/Range' );
const TranscriptionFactor = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/TranscriptionFactor' );

// constants
var REGULATORY_REGION_COLOR = new Color( 216, 191, 216 );
Expand Down
6 changes: 3 additions & 3 deletions js/common/model/GeneExpressionModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
* @author Mohamed Safi
* @author Aadish Gupta
*/
define( function( require ) {
define( require => {
'use strict';

//modules
var geneExpressionEssentials = require( 'GENE_EXPRESSION_ESSENTIALS/geneExpressionEssentials' );
var inherit = require( 'PHET_CORE/inherit' );
const geneExpressionEssentials = require( 'GENE_EXPRESSION_ESSENTIALS/geneExpressionEssentials' );
const inherit = require( 'PHET_CORE/inherit' );

/**
* @abstract
Expand Down
28 changes: 14 additions & 14 deletions js/common/model/MessengerRna.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@
* @author Mohamed Safi
* @author Aadish Gupta
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var AttachmentSite = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/AttachmentSite' );
var BooleanProperty = require( 'AXON/BooleanProperty' );
var FlatSegment = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/FlatSegment' );
var GEEConstants = require( 'GENE_EXPRESSION_ESSENTIALS/common/GEEConstants' );
var geneExpressionEssentials = require( 'GENE_EXPRESSION_ESSENTIALS/geneExpressionEssentials' );
var inherit = require( 'PHET_CORE/inherit' );
var MessengerRnaAttachmentStateMachine = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/attachment-state-machines/MessengerRnaAttachmentStateMachine' );
var MessengerRnaDestroyer = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/MessengerRnaDestroyer' );
var PlacementHint = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/PlacementHint' );
var Ribosome = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/Ribosome' );
var Shape = require( 'KITE/Shape' );
var Vector2 = require( 'DOT/Vector2' );
var WindingBiomolecule = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/WindingBiomolecule' );
const AttachmentSite = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/AttachmentSite' );
const BooleanProperty = require( 'AXON/BooleanProperty' );
const FlatSegment = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/FlatSegment' );
const GEEConstants = require( 'GENE_EXPRESSION_ESSENTIALS/common/GEEConstants' );
const geneExpressionEssentials = require( 'GENE_EXPRESSION_ESSENTIALS/geneExpressionEssentials' );
const inherit = require( 'PHET_CORE/inherit' );
const MessengerRnaAttachmentStateMachine = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/attachment-state-machines/MessengerRnaAttachmentStateMachine' );
const MessengerRnaDestroyer = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/MessengerRnaDestroyer' );
const PlacementHint = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/PlacementHint' );
const Ribosome = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/Ribosome' );
const Shape = require( 'KITE/Shape' );
const Vector2 = require( 'DOT/Vector2' );
const WindingBiomolecule = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/WindingBiomolecule' );

// constants
var RIBOSOME_CONNECTION_DISTANCE = 400; // picometers - distance within which this will connect to a ribosome
Expand Down
16 changes: 8 additions & 8 deletions js/common/model/MessengerRnaDestroyer.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
* @author Mohamed Safi
* @author Aadish Gupta
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var Color = require( 'SCENERY/util/Color' );
var geneExpressionEssentials = require( 'GENE_EXPRESSION_ESSENTIALS/geneExpressionEssentials' );
var inherit = require( 'PHET_CORE/inherit' );
var MobileBiomolecule = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/MobileBiomolecule' );
var MRnaDestroyerAttachmentStateMachine = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/attachment-state-machines/MRnaDestroyerAttachmentStateMachine' );
var Shape = require( 'KITE/Shape' );
var Vector2 = require( 'DOT/Vector2' );
const Color = require( 'SCENERY/util/Color' );
const geneExpressionEssentials = require( 'GENE_EXPRESSION_ESSENTIALS/geneExpressionEssentials' );
const inherit = require( 'PHET_CORE/inherit' );
const MobileBiomolecule = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/MobileBiomolecule' );
const MRnaDestroyerAttachmentStateMachine = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/attachment-state-machines/MRnaDestroyerAttachmentStateMachine' );
const Shape = require( 'KITE/Shape' );
const Vector2 = require( 'DOT/Vector2' );

// constants
var WIDTH = 250; // In nanometers.
Expand Down
14 changes: 7 additions & 7 deletions js/common/model/MessengerRnaFragment.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
* @author Mohamed Safi
* @author Aadish Gupta
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var geneExpressionEssentials = require( 'GENE_EXPRESSION_ESSENTIALS/geneExpressionEssentials' );
var inherit = require( 'PHET_CORE/inherit' );
var MessengerRnaFragmentAttachmentStateMachine = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/attachment-state-machines/MessengerRnaFragmentAttachmentStateMachine' );
var Shape = require( 'KITE/Shape' );
var SquareSegment = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/SquareSegment' );
var WindingBiomolecule = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/WindingBiomolecule' );
const geneExpressionEssentials = require( 'GENE_EXPRESSION_ESSENTIALS/geneExpressionEssentials' );
const inherit = require( 'PHET_CORE/inherit' );
const MessengerRnaFragmentAttachmentStateMachine = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/attachment-state-machines/MessengerRnaFragmentAttachmentStateMachine' );
const Shape = require( 'KITE/Shape' );
const SquareSegment = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/SquareSegment' );
const WindingBiomolecule = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/WindingBiomolecule' );

// constants
var MRNA_WINDING_ALGORITHMS = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ];
Expand Down
20 changes: 10 additions & 10 deletions js/common/model/MobileBiomolecule.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@
* @author Mohamed Safi
* @author Aadish Gupta
*/
define( function( require ) {
define( require => {
'use strict';

//modules
var BooleanProperty = require( 'AXON/BooleanProperty' );
var Color = require( 'SCENERY/util/Color' );
var geneExpressionEssentials = require( 'GENE_EXPRESSION_ESSENTIALS/geneExpressionEssentials' );
var inherit = require( 'PHET_CORE/inherit' );
var MotionBounds = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/motion-strategies/MotionBounds' );
var Property = require( 'AXON/Property' );
var ShapeChangingModelElement = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/ShapeChangingModelElement' );
var Vector2 = require( 'DOT/Vector2' );
var Vector3 = require( 'DOT/Vector3' );
const BooleanProperty = require( 'AXON/BooleanProperty' );
const Color = require( 'SCENERY/util/Color' );
const geneExpressionEssentials = require( 'GENE_EXPRESSION_ESSENTIALS/geneExpressionEssentials' );
const inherit = require( 'PHET_CORE/inherit' );
const MotionBounds = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/motion-strategies/MotionBounds' );
const Property = require( 'AXON/Property' );
const ShapeChangingModelElement = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/ShapeChangingModelElement' );
const Vector2 = require( 'DOT/Vector2' );
const Vector3 = require( 'DOT/Vector3' );

/**
* @param {GeneExpressionModel} model
Expand Down
10 changes: 5 additions & 5 deletions js/common/model/PlacementHint.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
* @author Mohamed Safi
* @author Aadish Gupta
*/
define( function( require ) {
define( require => {
'use strict';

// modules
var geneExpressionEssentials = require( 'GENE_EXPRESSION_ESSENTIALS/geneExpressionEssentials' );
var inherit = require( 'PHET_CORE/inherit' );
var Property = require( 'AXON/Property' );
var ShapeChangingModelElement = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/ShapeChangingModelElement' );
const geneExpressionEssentials = require( 'GENE_EXPRESSION_ESSENTIALS/geneExpressionEssentials' );
const inherit = require( 'PHET_CORE/inherit' );
const Property = require( 'AXON/Property' );
const ShapeChangingModelElement = require( 'GENE_EXPRESSION_ESSENTIALS/common/model/ShapeChangingModelElement' );

/**
*
Expand Down
Loading

0 comments on commit d72fc95

Please sign in to comment.