From 33cb5f69edd3917f14351041299ec0b9afe05414 Mon Sep 17 00:00:00 2001 From: Chris Malley Date: Thu, 7 Jun 2018 16:27:00 -0600 Subject: [PATCH] add missing tandems #38 Signed-off-by: Chris Malley --- js/common/view/EquilibriumPositionNode.js | 2 +- js/common/view/RoboticArmNode.js | 5 ++++- js/intro/view/IntroSceneControl.js | 4 ++-- js/intro/view/IntroVisibilityControls.js | 7 +++++-- js/systems/view/SystemsSceneControl.js | 4 ++-- js/systems/view/SystemsScreenView.js | 6 ++++-- 6 files changed, 18 insertions(+), 10 deletions(-) diff --git a/js/common/view/EquilibriumPositionNode.js b/js/common/view/EquilibriumPositionNode.js index f0f8877b..574dea0b 100644 --- a/js/common/view/EquilibriumPositionNode.js +++ b/js/common/view/EquilibriumPositionNode.js @@ -26,7 +26,7 @@ define( function( require ) { stroke: HookesLawColors.EQUILIBRIUM_POSITION, lineWidth: 2, lineDash: [ 3, 3 ], - tandem: Tandem.required + tandem: Tandem.optional // because this node is used to create icons }, options ); Line.call( this, 0, 0, 0, length, options ); diff --git a/js/common/view/RoboticArmNode.js b/js/common/view/RoboticArmNode.js index c6209e85..18dcc2d7 100644 --- a/js/common/view/RoboticArmNode.js +++ b/js/common/view/RoboticArmNode.js @@ -150,7 +150,10 @@ define( function( require ) { end: function( event ) { numberOfInteractionsInProgressProperty.set( numberOfInteractionsInProgressProperty.get() - 1 ); - } + }, + + // phet-io + tandem: options.tandem.createTandem( 'dragHandler' ) } ); draggableNode.addInputListener( dragHandler ); diff --git a/js/intro/view/IntroSceneControl.js b/js/intro/view/IntroSceneControl.js index d658546b..acdcd492 100644 --- a/js/intro/view/IntroSceneControl.js +++ b/js/intro/view/IntroSceneControl.js @@ -36,8 +36,8 @@ define( function( require ) { }, options ); RadioButtonGroup.call( this, numberOfSystemsProperty, [ - { value: 1, node: HookesLawIconFactory.createSingleSpringIcon() }, - { value: 2, node: HookesLawIconFactory.createTwoSpringsIcon() } + { value: 1, node: HookesLawIconFactory.createSingleSpringIcon(), tandemName: 'oneSystemRadioButton' }, + { value: 2, node: HookesLawIconFactory.createTwoSpringsIcon(), tandemName: 'twoSystemsRadioButton' } ], options ); } diff --git a/js/intro/view/IntroVisibilityControls.js b/js/intro/view/IntroVisibilityControls.js index 86907ffc..a82629b5 100644 --- a/js/intro/view/IntroVisibilityControls.js +++ b/js/intro/view/IntroVisibilityControls.js @@ -84,12 +84,15 @@ define( function( require ) { var equilibriumPositionCheckbox = new Checkbox( HookesLawIconFactory.createEquilibriumPositionCheckboxContent(), properties.equilibriumPositionVisibleProperty, - HookesLawConstants.CHECK_BOX_OPTIONS ); + _.extend( { + tandem: options.tandem.createTandem( 'equilibriumPositionCheckbox' ) + }, HookesLawConstants.CHECK_BOX_OPTIONS ) ); + var valuesCheckbox = new Checkbox( new Text( valuesString, HookesLawConstants.CONTROL_TEXT_OPTIONS ), properties.valuesVisibleProperty, _.extend( { - tandem: options.tandem.createTandem( 'equilibriumPositionCheckbox' ) + tandem: options.tandem.createTandem( 'valuesCheckbox' ) }, HookesLawConstants.CHECK_BOX_OPTIONS ) ); // 'Values' checkbox pertains to vectors, so enable that checkbox only if one or more of the vectors is selected. diff --git a/js/systems/view/SystemsSceneControl.js b/js/systems/view/SystemsSceneControl.js index 14c5c6a7..aad42c85 100644 --- a/js/systems/view/SystemsSceneControl.js +++ b/js/systems/view/SystemsSceneControl.js @@ -36,8 +36,8 @@ define( function( require ) { }, options ); RadioButtonGroup.call( this, seriesParallelProperty, [ - { value: 'parallel', node: HookesLawIconFactory.createParallelSystemIcon() }, - { value: 'series', node: HookesLawIconFactory.createSeriesSystemIcon() } + { value: 'parallel', node: HookesLawIconFactory.createParallelSystemIcon(), tandemName: 'parallelRadioButton' }, + { value: 'series', node: HookesLawIconFactory.createSeriesSystemIcon(), tandemName: 'seriesRadioButton' } ], options ); } diff --git a/js/systems/view/SystemsScreenView.js b/js/systems/view/SystemsScreenView.js index de3c8b51..934aecf1 100644 --- a/js/systems/view/SystemsScreenView.js +++ b/js/systems/view/SystemsScreenView.js @@ -62,7 +62,8 @@ define( function( require ) { unitDisplacementLength: unitDisplacementLength, left: this.layoutBounds.left + 15, //careful! position this so that max applied force vector doesn't go offscreen or overlap control panel centerY: this.layoutBounds.centerY, - visible: viewProperties.seriesParallelProperty.get() === 'series' + visible: viewProperties.seriesParallelProperty.get() === 'series', + tandem: tandem.createTandem( 'seriesSystemNode' ) } ); this.addChild( seriesSystemNode ); @@ -71,7 +72,8 @@ define( function( require ) { unitDisplacementLength: unitDisplacementLength, left: seriesSystemNode.left, centerY: this.layoutBounds.centerY, - visible: viewProperties.seriesParallelProperty.get() === 'parallel' + visible: viewProperties.seriesParallelProperty.get() === 'parallel', + tandem: tandem.createTandem( 'parallelSystemNode' ) } ); assert && assert( parallelSystemNode.height < this.layoutBounds.height, 'parallel system is too tall' ); this.addChild( parallelSystemNode );