Skip to content

Commit

Permalink
Specify max width for CircuitElementEditNode number control, see #399
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Sep 6, 2017
1 parent 22c8222 commit 3284e99
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions js/view/CircuitElementEditNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ define( function( require ) {

// constants
var FONT = new PhetFont( CircuitConstructionKitCommonConstants.FONT_SIZE );
var NUMBER_CONTROL_ELEMENT_MAX_WIDTH = 140;

/**
* @param {string} title - text to show as a title
Expand All @@ -40,6 +41,8 @@ define( function( require ) {

// Create the controls
var numberControl = new NumberControl( title, valueProperty, circuitElement.editableRange, _.extend( {
titleMaxWidth: NUMBER_CONTROL_ELEMENT_MAX_WIDTH,
valueMaxWidth: NUMBER_CONTROL_ELEMENT_MAX_WIDTH,
tandem: tandem.createTandem( 'numberControl' ),
valuePattern: valuePattern
}, {
Expand Down

0 comments on commit 3284e99

Please sign in to comment.