From f6f903831f0d58ae2b09e7a843a838b7ef8bef6e Mon Sep 17 00:00:00 2001 From: Sam Reid Date: Fri, 26 Aug 2022 11:12:42 -0600 Subject: [PATCH] Add tandemSuffix option, specify and match conventions, see https://github.com/phetsims/tandem/issues/267 --- js/common/view/ForcesAndMotionBasicsIconFactory.js | 3 ++- js/motion/view/MotionControlPanel.js | 2 +- js/netforce/view/NetForceControlPanel.js | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/js/common/view/ForcesAndMotionBasicsIconFactory.js b/js/common/view/ForcesAndMotionBasicsIconFactory.js index 404a72dc..cedb3f3b 100644 --- a/js/common/view/ForcesAndMotionBasicsIconFactory.js +++ b/js/common/view/ForcesAndMotionBasicsIconFactory.js @@ -8,6 +8,7 @@ import Property from '../../../../axon/js/Property.js'; import Range from '../../../../dot/js/Range.js'; +import Tandem from '../../../../tandem/js/Tandem.js'; import GaugeNode from '../../../../scenery-phet/js/GaugeNode.js'; import forcesAndMotionBasics from '../../forcesAndMotionBasics.js'; import forcesAndMotionBasicsStrings from '../../forcesAndMotionBasicsStrings.js'; @@ -24,7 +25,7 @@ const ForcesAndMotionBasicsIconFactory = { // the 'speed' option requires the text and a speedometer icon const speedometerIconValueProperty = new Property( 0 ); return new GaugeNode( speedometerIconValueProperty, speedString, new Range( 0, MotionConstants.MAX_SPEED ), - { radius: 67, scale: 0.2, tandem: tandem.createTandem( 'speedometerIcon' ) } ); + { radius: 67, scale: 0.2, tandem: Tandem.OPT_OUT } ); } }; diff --git a/js/motion/view/MotionControlPanel.js b/js/motion/view/MotionControlPanel.js index 014e0249..4032c11a 100644 --- a/js/motion/view/MotionControlPanel.js +++ b/js/motion/view/MotionControlPanel.js @@ -88,7 +88,7 @@ class MotionControlPanel extends Node { const speedometerIcon = () => { const speedometerIconValueProperty = new Property( 0 ); return new GaugeNode( speedometerIconValueProperty, speedString, new Range( 0, MotionConstants.MAX_SPEED ), - { radius: 67, scale: 0.2, tandem: tandem.createTandem( 'speedometerIcon' ) } ); + { radius: 67, scale: 0.2, tandem: tandem.createTandem( 'speedometerIconNode' ) } ); }; const accelerometerIcon = () => { const accelerometerIconValueProperty = new Property( 5 ); // the acclerometer icon looks best with ~5 m/s^2 filled in diff --git a/js/netforce/view/NetForceControlPanel.js b/js/netforce/view/NetForceControlPanel.js index 0b48cdec..606579b4 100644 --- a/js/netforce/view/NetForceControlPanel.js +++ b/js/netforce/view/NetForceControlPanel.js @@ -41,7 +41,7 @@ class NetForceControlPanel extends Node { const fontOptions = { font: new PhetFont( 18 ), maxWidth: 230 }; // the content for "show speed" is a label with an icon - const speedometerIcon = ForcesAndMotionBasicsIconFactory.speedometerIcon( tandem.createTandem( 'speedometerIcon' ) ); + const speedometerIcon = ForcesAndMotionBasicsIconFactory.speedometerIcon( tandem.createTandem( 'speedometerIconNode' ) ); const showSpeedTextNode = new Text( speedString, merge( { tandem: tandem.createTandem( 'showSpeedTextNode' ) }, fontOptions ) ); const showSpeedContent = new HBox( { children: [ showSpeedTextNode, speedometerIcon ],