Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
# Conflicts:
#	js/common/enum/ForcesModeChoice.js
#	js/common/enum/SimSpeedChoice.js
  • Loading branch information
Denz1994 committed Jan 30, 2019
2 parents 7f2c2e1 + 5fd6d9b commit 1fab22b
Show file tree
Hide file tree
Showing 30 changed files with 42 additions and 32 deletions.
2 changes: 1 addition & 1 deletion js/common/model/MassesAndSpringsModel.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2016-2018, University of Colorado Boulder
// Copyright 2016-2019, University of Colorado Boulder

/**
* Common model (base type) for Masses and Springs
Expand Down
7 changes: 4 additions & 3 deletions js/common/model/Spring.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2016-2018, University of Colorado Boulder
// Copyright 2016-2019, University of Colorado Boulder

/**
* Responsible for the attributes associated with each spring.
Expand Down Expand Up @@ -55,6 +55,8 @@ define( function( require ) {
} );

// Link to manage gravity value for the spring object.
// REVIEW: This would be a leak if springs keep sharing one gravity property (and springs could be created).
// REVIEW: Probably a good place to mention object lifetimes.
gravityProperty.link( function( gravity ) {
self.gravityProperty.set( gravity );
} );
Expand Down Expand Up @@ -621,5 +623,4 @@ define( function( require ) {
}
}
} );
} )
;
} );
2 changes: 1 addition & 1 deletion js/common/view/DraggableRulerNode.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2017-2018, University of Colorado Boulder
// Copyright 2017-2019, University of Colorado Boulder

/**
* Responsible for the attributes and drag handlers associated with the ruler node.
Expand Down
2 changes: 1 addition & 1 deletion js/common/view/DraggableTimerNode.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2017-2018, University of Colorado Boulder
// Copyright 2017-2019, University of Colorado Boulder

/**
* Responsible for the attributes and drag handlers associated with the timer node.
Expand Down
5 changes: 4 additions & 1 deletion js/common/view/EnergyGraphNode.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2017-2018, University of Colorado Boulder
// Copyright 2017-2019, University of Colorado Boulder

/**
* Bar graph that represents the kinetic, potential, elastic potential, thermal, and total energy of the mass attached
Expand Down Expand Up @@ -111,6 +111,9 @@ define( function( require ) {
},
scale: 0.7
} );

// REVIEW: Probably good to mention the lifetime of this, since this would be a memory leak if many of these are
// REVIEW: created.
model.firstSpring.thermalEnergyProperty.link( function( value ) {
clearThermalButton.enabled = ( value > 0 );
clearThermalButton.pickable = ( value > 0 );
Expand Down
2 changes: 1 addition & 1 deletion js/common/view/ForceVectorArrow.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2017-2018, University of Colorado Boulder
// Copyright 2017-2019, University of Colorado Boulder

/**
* Responsible for the creation of the arrowNodes associated with the masses and visibility panels.
Expand Down
4 changes: 3 additions & 1 deletion js/common/view/GravityAndDampingControlNode.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2017-2018, University of Colorado Boulder
// Copyright 2017-2019, University of Colorado Boulder

/**
* Node for the gravity control panel and combo box for planet gravity options.
Expand Down Expand Up @@ -254,6 +254,8 @@ define( function( require ) {
}

// Responsible for managing bodies
// REVIEW: Probably good to mention the lifetime of this, since this would be a memory leak if many of these are
// REVIEW: created.
model.bodyProperty.link( function( newBody, oldBody ) {
var body = _.find( Body.BODIES, newBody );

Expand Down
2 changes: 1 addition & 1 deletion js/common/view/GravityComboBox.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2017-2019, University of Colorado Boulder
// Copyright 2019, University of Colorado Boulder

/**
* ComboBox used for selecting planets.
Expand Down
4 changes: 3 additions & 1 deletion js/common/view/MassNode.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2017-2018, University of Colorado Boulder
// Copyright 2017-2019, University of Colorado Boulder

/**
* Node responsible for representing the mass object.
Expand Down Expand Up @@ -79,6 +79,8 @@ define( function( require ) {
} );

// Update the size of the massNode
// REVIEW: Probably good to mention the lifetime of this, since this would be a memory leak if many of these are
// REVIEW: created for a single mass
mass.radiusProperty.link( function( radiusValue ) {

self.rect.rectBounds = new Bounds2(
Expand Down
2 changes: 1 addition & 1 deletion js/common/view/MassValueControlPanel.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2017-2018, University of Colorado Boulder
// Copyright 2017-2019, University of Colorado Boulder

/**
* Panel that is responsible for adjusting the value of its corresponding mass.
Expand Down
2 changes: 1 addition & 1 deletion js/common/view/MovableLineNode.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2017-2018, University of Colorado Boulder
// Copyright 2017-2019, University of Colorado Boulder

/**
* Node for the reference line and laser pointer node.
Expand Down
2 changes: 1 addition & 1 deletion js/common/view/OneSpringScreenView.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2016-2018, University of Colorado Boulder
// Copyright 2016-2019, University of Colorado Boulder

/**
* Common ScreenView for using one mass.
Expand Down
3 changes: 2 additions & 1 deletion js/common/view/OscillatingSpringNode.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2017-2018, University of Colorado Boulder
// Copyright 2017-2019, University of Colorado Boulder

/**
* Node for handling the representation of an oscillating spring.
Expand Down Expand Up @@ -73,6 +73,7 @@ define( function( require ) {
self.y = modelViewTransform2.modelToViewY( spring.positionProperty.get().y - spring.lengthProperty.get() );
}

// REVIEW: Probably worth noting that this type creates permanent listeners.
spring.naturalRestingLengthProperty.link( function( springLength ) {
self.loopsProperty.set( MAP_NUMBER_OF_LOOPS( springLength ) );
updateViewLength();
Expand Down
2 changes: 1 addition & 1 deletion js/common/view/ReferenceLineNode.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2017-2018, University of Colorado Boulder
// Copyright 2017-2019, University of Colorado Boulder

/**
* Responsible for the attributes associated with the reference line nodes.
Expand Down
2 changes: 1 addition & 1 deletion js/common/view/ShelfNode.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2017, University of Colorado Boulder
// Copyright 2017-2019, University of Colorado Boulder

/**
* Shelf used to house the masses when they are not being dragged or attached to a spring
Expand Down
2 changes: 1 addition & 1 deletion js/common/view/SpringControlPanel.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2016-2018, University of Colorado Boulder
// Copyright 2016-2019, University of Colorado Boulder

/**
* Panel responsible for adjusting the a Property of the spring using an hslider.
Expand Down
2 changes: 1 addition & 1 deletion js/common/view/SpringHangerNode.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2017-2018, University of Colorado Boulder
// Copyright 2017-2019, University of Colorado Boulder

/**
* Object that creates the grey bar that the springs hang from and their respective numerical label.
Expand Down
2 changes: 1 addition & 1 deletion js/common/view/SpringScreenView.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2017-2018, University of Colorado Boulder
// Copyright 2017-2019, University of Colorado Boulder

/**
* Common ScreenView used for both singular and multispring screen view.
Expand Down
2 changes: 1 addition & 1 deletion js/common/view/ToolboxPanel.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2017-2018, University of Colorado Boulder
// Copyright 2017-2019, University of Colorado Boulder

/**
* Responsible for the toolbox panel and the ruler/timer icons held within
Expand Down
2 changes: 1 addition & 1 deletion js/common/view/VectorArrow.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2017-2018, University of Colorado Boulder
// Copyright 2017-2019, University of Colorado Boulder

/**
* Responsible for the creation of the arrowNodes associated with the masses and visibility panels.
Expand Down
2 changes: 1 addition & 1 deletion js/energy/model/EnergyModel.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2017-2018, University of Colorado Boulder
// Copyright 2017-2019, University of Colorado Boulder

/**
* Energy model (base type) for Masses and Springs
Expand Down
2 changes: 1 addition & 1 deletion js/intro/enum/SceneModeChoice.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018, University of Colorado Boulder
// Copyright 2018-2019, University of Colorado Boulder

/**
* Enumeration for scene mode choices intro screen.
Expand Down
2 changes: 1 addition & 1 deletion js/intro/model/IntroModel.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2016-2018, University of Colorado Boulder
// Copyright 2016-2019, University of Colorado Boulder

/**
* Intro model (base type) for Masses and Springs
Expand Down
3 changes: 2 additions & 1 deletion js/intro/view/ConstantsControlPanel.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2017-2018, University of Colorado Boulder
// Copyright 2017-2019, University of Colorado Boulder

/**
* Panel responsible for keeping the spring constant and spring thickness constant.
Expand Down Expand Up @@ -59,6 +59,7 @@ define( function( require ) {
} );

var constantText = new Text(
// REVIEW: Why the fill in with an empty string? Looks suspicious
StringUtils.fillIn( springConstantString, { spring: '' } ),
_.extend( { font: TITLE_FONT, tandem: tandem.createTandem( 'constantText' ) },
constantsSelectionButtonOptions ) );
Expand Down
2 changes: 1 addition & 1 deletion js/intro/view/IntroScreenView.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2016-2018, University of Colorado Boulder
// Copyright 2016-2019, University of Colorado Boulder

/**
* ScreenView for the 'Intro' screen
Expand Down
2 changes: 1 addition & 1 deletion js/lab/model/LabModel.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2016-2018, University of Colorado Boulder
// Copyright 2016-2019, University of Colorado Boulder

/**
* Lab model (base type) for Masses and Springs
Expand Down
2 changes: 1 addition & 1 deletion js/lab/view/LabScreenView.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2016-2018, University of Colorado Boulder
// Copyright 2016-2019, University of Colorado Boulder

/**
* Screen view used for lab screen.
Expand Down
2 changes: 1 addition & 1 deletion js/lab/view/PeriodTraceNode.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2018, University of Colorado Boulder
// Copyright 2018-2019, University of Colorado Boulder

/**
* View for period trace of mass oscillation.
Expand Down
2 changes: 1 addition & 1 deletion js/vectors/view/IndicatorVisibilityControlNode.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2017-2018, University of Colorado Boulder
// Copyright 2017-2019, University of Colorado Boulder

/**
* Panel that manages options for visibility of reference lines on vector screen.
Expand Down
2 changes: 1 addition & 1 deletion js/vectors/view/VectorVisibilityControlNode.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2017-2018, University of Colorado Boulder
// Copyright 2017-2019, University of Colorado Boulder

/**
* Panel that manages options visibility for vectors and period trace in Basics version.
Expand Down

0 comments on commit 1fab22b

Please sign in to comment.