Skip to content

Commit

Permalink
Convert LinearFunction to a class with an evaluate method, see phetsi…
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Nov 2, 2021
1 parent c76c1f3 commit f65e92c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/john-travoltage/view/AppendageNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,8 @@ class AppendageNode extends Node {
inverseMap: position => this.a11yPositionToAngle( position )
} );

const pdomValueMin = Utils.toFixedNumber( this.angleToPDOMValueFunction( appendage.angleProperty.range.min ), 0 );
const pdomValueMax = Utils.toFixedNumber( this.angleToPDOMValueFunction( appendage.angleProperty.range.max ), 0 );
const pdomValueMin = Utils.toFixedNumber( this.angleToPDOMValueFunction.evaluate( appendage.angleProperty.range.min ), 0 );
const pdomValueMax = Utils.toFixedNumber( this.angleToPDOMValueFunction.evaluate( appendage.angleProperty.range.max ), 0 );
const sliderMin = Math.min( pdomValueMin, pdomValueMax );
const sliderMax = Math.max( pdomValueMin, pdomValueMax );
this.initializeAccessibleSlider(
Expand Down Expand Up @@ -300,7 +300,7 @@ class AppendageNode extends Node {
* @public
*/
a11yAngleToPosition( angle ) {
return Utils.roundSymmetric( this.angleToPDOMValueFunction( angle ) );
return Utils.roundSymmetric( this.angleToPDOMValueFunction.evaluate( angle ) );
}

/**
Expand Down

0 comments on commit f65e92c

Please sign in to comment.