Skip to content

Commit

Permalink
cleanup after prototype by passing in force describer to ISLCObjectNo…
Browse files Browse the repository at this point in the history
…de, #146
  • Loading branch information
zepumph committed Jun 28, 2019
1 parent 4382316 commit 8a7385b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js/gravity-force-lab-basics/view/GFLBMassNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ define( require => {
* @param {Bounds2} layoutBounds
* @param {ModelViewTransform2} modelViewTransform
* @param {GFLBAlertManager} alertManager
* @param {GFLBForceDescriber} forceDescriber
* @param {GFLBPositionDescriber} positionDescriber
* @param {Object} [options]
*/
constructor( model, mass, layoutBounds, modelViewTransform, alertManager, positionDescriber, options ) {
constructor( model, mass, layoutBounds, modelViewTransform, alertManager, forceDescriber, positionDescriber, options ) {

options = _.extend( {
arrowLabelFill: 'black',
Expand Down Expand Up @@ -57,7 +58,7 @@ define( require => {
additionalA11yDependencies: [ model.showDistanceProperty ]
}, options );

super( model, mass, layoutBounds, modelViewTransform, alertManager, positionDescriber, options );
super( model, mass, layoutBounds, modelViewTransform, alertManager, forceDescriber, positionDescriber, options );
}
}

Expand Down
2 changes: 2 additions & 0 deletions js/gravity-force-lab-basics/view/GFLBScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ define( require => {

// add the mass nodes to the view
const mass1Node = new GFLBMassNode( model, model.object1, this.layoutBounds, modelViewTransform, alertManager,
forceDescriber,
positionDescriber, {
label: mass1LabelString,
otherObjectLabel: mass2LabelString,
Expand All @@ -128,6 +129,7 @@ define( require => {
} );

const mass2Node = new GFLBMassNode( model, model.object2, this.layoutBounds, modelViewTransform, alertManager,
forceDescriber,
positionDescriber, {
label: mass2LabelString,
otherObjectLabel: mass1LabelString,
Expand Down

0 comments on commit 8a7385b

Please sign in to comment.