From b3963e81730197db27d02e03a7bd1baf612cc9bd Mon Sep 17 00:00:00 2001 From: zepumph Date: Mon, 16 Aug 2021 13:59:19 -0600 Subject: [PATCH] create Properties to control displayOnly of every diameter control and every mass too, https://github.com/phetsims/projectile-motion/issues/270 --- js/NumberControl.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/js/NumberControl.js b/js/NumberControl.js index 6d6249855..cb97c7f33 100644 --- a/js/NumberControl.js +++ b/js/NumberControl.js @@ -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; @@ -373,7 +373,6 @@ class NumberControl extends Node { } } ); - // @private this.disposeNumberControl = () => { numberDisplay.dispose();