Skip to content

Commit

Permalink
create Properties to control displayOnly of every diameter control an…
Browse files Browse the repository at this point in the history
…d every mass too, phetsims/projectile-motion#270
  • Loading branch information
zepumph committed Aug 16, 2021
1 parent f81502e commit b3963e8
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions js/NumberControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,15 +355,15 @@ class NumberControl extends Node {
// @private
this.numberDisplay = numberDisplay;

// @private for use via PhET-iO, see https://github.com/phetsims/sun/issues/451
// @public, for use via PhET-iO, see https://github.com/phetsims/sun/issues/686
// This is not generally controlled by the user, so it is not reset when the Reset All button is pressed.
const displayOnlyProperty = new BooleanProperty( false, {
this.displayOnlyProperty = new BooleanProperty( false, {
tandem: options.tandem.createTandem( 'displayOnlyProperty' ),
phetioFeatured: true,
phetioDocumentation: 'disables interaction with the NumberControl and ' +
'makes it appear like a display that shows the current numeric value'
} );
displayOnlyProperty.link( displayOnly => {
this.displayOnlyProperty.link( displayOnly => {
this.slider.visible = !displayOnly;
if ( decrementButton ) {
decrementButton.visible = !displayOnly;
Expand All @@ -373,7 +373,6 @@ class NumberControl extends Node {
}
} );


// @private
this.disposeNumberControl = () => {
numberDisplay.dispose();
Expand Down

0 comments on commit b3963e8

Please sign in to comment.