Skip to content

Commit

Permalink
add missing tandems #38
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Malley <cmalley@pixelzoom.com>
  • Loading branch information
pixelzoom committed Jun 7, 2018
1 parent 18b640c commit 33cb5f6
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 10 deletions.
2 changes: 1 addition & 1 deletion js/common/view/EquilibriumPositionNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
5 changes: 4 additions & 1 deletion js/common/view/RoboticArmNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

Expand Down
4 changes: 2 additions & 2 deletions js/intro/view/IntroSceneControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}

Expand Down
7 changes: 5 additions & 2 deletions js/intro/view/IntroVisibilityControls.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions js/systems/view/SystemsSceneControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}

Expand Down
6 changes: 4 additions & 2 deletions js/systems/view/SystemsScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 );

Expand All @@ -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 );
Expand Down

0 comments on commit 33cb5f6

Please sign in to comment.