Skip to content

Commit

Permalink
all ui components should have enabledProperty and visibleProperty phe…
Browse files Browse the repository at this point in the history
…tioFeatured, phetsims/phet-io#1517
  • Loading branch information
zepumph authored and marlitas committed Jun 28, 2022
1 parent 9bd2f0e commit 12c5d9f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion js/NumberPicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ define( function( require ) {

// a11y
pageKeyboardStep: 2 // {number} - change in value when using page up/page down, see AccessibleNumberSpinner

}, options );

// {Color|string|Property.<Color|string} color of arrows and top/bottom gradient when pressed
Expand All @@ -141,6 +140,8 @@ define( function( require ) {
assert && assert( options.disabledOpacity > 0 && options.disabledOpacity < 1,
`invalid disabledOpacity: ${options.disabledOpacity}` );

PhetioObject.mergePhetioComponentOptions( { visibleProperty: { phetioFeatured: true } }, options );

var self = this;
Node.call( this );

Expand All @@ -167,6 +168,9 @@ define( function( require ) {
phetioFeatured: true
}, options.enabledPropertyOptions ) );
}
else {
assert && assert( this.enabledProperty.phetioFeatured, 'provided enabledProperty must be phetioFeatured' );
}

//------------------------------------------------------------
// Nodes
Expand Down

0 comments on commit 12c5d9f

Please sign in to comment.