Skip to content

Commit

Permalink
fix non integer decimalPlaces, phetsims/dot#113
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Dec 22, 2023
1 parent ef6595f commit add938b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/common/view/drag/DragHandleValueNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class DragHandleValueNode extends Node {
* @param {number} value
* @param {number} decimalPlaces
*/
setValue( value, decimalPlaces ) {
setValue( value, decimalPlaces = 0 ) {
const formattedValue = Utils.toFixed( value, decimalPlaces /* one decimal place */ );
this.valueText.setString( StringUtils.fillIn( this.unitsPattern, {
value: formattedValue
Expand Down

0 comments on commit add938b

Please sign in to comment.