Skip to content

Commit

Permalink
Reformat files with trailing spaces, see phetsims/chipper#734
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Sep 28, 2019
1 parent 8614029 commit e8e5814
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 26 deletions.
6 changes: 3 additions & 3 deletions js/trig-tour/view/TrigTourGraphAxesNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ define( require => {
// tic mark labels in radians
const tickMarkLabelsInRadians = new Node();
let labelString = '';
const pi = MathSymbols.PI;
const pi = MathSymbols.PI;
const labelStrings = [
StringUtils.format( numberPiPatternString, '-4', pi ),
StringUtils.format( numberPiPatternString, '-3', pi ),
Expand Down Expand Up @@ -182,8 +182,8 @@ define( require => {

viewProperties.angleUnitsProperty.link( function( angleUnits ) {
if ( viewProperties.labelsVisibleProperty.value ) {
tickMarkLabelsInRadians.visible = ( angleUnits === 'radians');
tickMarkLabelsInDegrees.visible = ( angleUnits !== 'radians');
tickMarkLabelsInRadians.visible = ( angleUnits === 'radians' );
tickMarkLabelsInDegrees.visible = ( angleUnits !== 'radians' );
}
} );

Expand Down
4 changes: 2 additions & 2 deletions js/trig-tour/view/TrigTourScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ define( require => {
const height = 2.4 * 160;
const arcRadius = 8;
const xOffset = 10; // we want the width in the x direction to be offset slightly to include the 'x' label
const whiteSheet = new Rectangle( -width / 2, -height / 2, width + xOffset, height, arcRadius, arcRadius, {
const whiteSheet = new Rectangle( -width / 2, -height / 2, width + xOffset, height, arcRadius, arcRadius, {
fill: 'white',
stroke: TEXT_COLOR_GRAY,
lineWidth: 2
lineWidth: 2
} );
whiteSheet.x = this.layoutBounds.centerX;
whiteSheet.top = this.layoutBounds.top + 20;
Expand Down
12 changes: 6 additions & 6 deletions js/trig-tour/view/UnitCircleView.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ define( require => {
// Draw x-, y-axes with x and y labels
const arrowOptions = { tailWidth: 0.3, headHeight: 12, headWidth: ARROW_HEAD_WIDTH };
const yAxis = new ArrowNode( 0, 1.18 * radius, 0, -1.2 * radius, arrowOptions );
const xAxis = new ArrowNode( -1.2 * radius, 0, 1.2* radius, 0, arrowOptions );
const xAxis = new ArrowNode( -1.2 * radius, 0, 1.2 * radius, 0, arrowOptions );

// Draw and position x-, y-axis labels
let fontInfo = { font: DISPLAY_FONT, fill: TEXT_COLOR, maxWidth: MAX_LABEL_WIDTH };
Expand All @@ -127,7 +127,7 @@ define( require => {
// draw vertical (sine) line on rotor triangle
// displayed line is either simple Line (no arrow head) or TrigIndicatorArrowNode (with arrow head)
const verticalLine = new Line( 0, 0, 0, -radius, { lineWidth: 4, stroke: 'black' } );
const verticalIndicatorArrow = new TrigIndicatorArrowNode( radius, 'vertical', {
const verticalIndicatorArrow = new TrigIndicatorArrowNode( radius, 'vertical', {
tailWidth: 5,
lineWidth: 1,
fill: SIN_COLOR,
Expand All @@ -145,7 +145,7 @@ define( require => {

// Draw rotor arm with draggable red pin at end
const rotorArm = new Line( 0, 0, radius, 0, { lineWidth: 4, stroke: TrigTourColors.LINE_COLOR } );
const rotorPin = new Circle( 7, { stroke: LINE_COLOR, fill: 'red', cursor: 'pointer' } );
const rotorPin = new Circle( 7, { stroke: LINE_COLOR, fill: 'red', cursor: 'pointer' } );
const hitBound = 25;
rotorPin.mouseArea = rotorPin.bounds.dilated( hitBound );
rotorPin.touchArea = rotorPin.mouseArea;
Expand Down Expand Up @@ -209,10 +209,10 @@ define( require => {
}
else {
// maximum angle exceeded, only update full angle if abs val of small angle is decreasing
if( Math.abs( smallAngle ) < Math.abs( trigTourModel.previousAngle ) ) {
if ( Math.abs( smallAngle ) < Math.abs( trigTourModel.previousAngle ) ) {
// if the difference between angles is too large, rotor was dragged across Math.PI and small angle
// changed signs. Immediately return because this can allow the user to drag to far.
if( Math.abs( smallAngle - trigTourModel.previousAngle ) > Math.PI / 2 ) {
if ( Math.abs( smallAngle - trigTourModel.previousAngle ) > Math.PI / 2 ) {
return;
}
setFullAngle( smallAngle );
Expand Down Expand Up @@ -246,7 +246,7 @@ define( require => {
// set visibility of the labels, dependent on angle magnitude to avoid occlusion
thetaText.visible = !( Math.abs( totalAngle ) < Util.toRadians( 40 ) );
const sAngle = Math.abs( Util.toDegrees( smallAngle ) ); //small angle in degrees
yLabelText.visible = !( sAngle < 10 || (180 - sAngle) < 10 );
yLabelText.visible = !( sAngle < 10 || ( 180 - sAngle ) < 10 );
xLabelText.visible = !( Math.abs( 90 - sAngle ) < 5 );

// position one-label
Expand Down
26 changes: 13 additions & 13 deletions js/trig-tour/view/readout/LabelFractionValueRow.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Copyright 2016-2019, University of Colorado Boulder

/**
* Creates the third row for the ReadoutNode of Trig Tour. This row contains a label for the trig function,
* a fraction representation of the value, and the numeric value. This row is organized, separated by the equality
* Creates the third row for the ReadoutNode of Trig Tour. This row contains a label for the trig function,
* a fraction representation of the value, and the numeric value. This row is organized, separated by the equality
* sign. It looks like this:
*
* trig function label = trig fraction = trig value
Expand Down Expand Up @@ -53,7 +53,7 @@ define( require => {
* @param {Object} [options]
* @constructor
*/
function LabelFractionValueRow( trigLabelString, trigTourModel, viewProperties, options ) {
function LabelFractionValueRow( trigLabelString, trigTourModel, viewProperties, options ) {

Node.call( this, options );
const self = this;
Expand Down Expand Up @@ -102,7 +102,7 @@ define( require => {
}

// label section of the row, something like 'Cos θ ='
const trigLabelText = new TrigFunctionLabelText( trigString, {
const trigLabelText = new TrigFunctionLabelText( trigString, {
trigFunctionLabelFont: DISPLAY_FONT_LARGE_BOLD,
thetaLabelFont: DISPLAY_FONT_LARGE_BOLD_ITALIC
} );
Expand Down Expand Up @@ -131,7 +131,7 @@ define( require => {
trigValueFraction.leftCenter = rightEqualText.rightCenter.plusXY( space, 0 );

// if this row is for 'tan', create and add an infinity symbol to represent the singularity
if( trigLabelString === 'tan' ) {
if ( trigLabelString === 'tan' ) {
var plusMinusInfinityNode = new Node();
const plusMinusText = new Text( MathSymbols.PLUS_MINUS, { font: DISPLAY_FONT, fill: TEXT_COLOR } );
const infinityText = new Text( MathSymbols.INFINITY, { font: DISPLAY_FONT_LARGE, fill: TEXT_COLOR } );
Expand All @@ -149,7 +149,7 @@ define( require => {
} );

// if this row has a node for infinity, link its visibility to the singularity
if( plusMinusInfinityNode ) {
if ( plusMinusInfinityNode ) {
trigTourModel.singularityProperty.link( function( singularity ) {
plusMinusInfinityNode.visible = singularity;
if ( !viewProperties.specialAnglesVisibleProperty.value ) {
Expand All @@ -172,22 +172,22 @@ define( require => {

/**
* Set the value of the trig value.
*
*
* @param {Text} trigValueNumberText
* @param {FractionNode} trigValueFraction
* @param {FractionNode} trigValueFraction
*/
setTrigReadout: function( trigValueNumberText, trigValueFraction ){
if( this.viewProperties.specialAnglesVisibleProperty.value ) {
setTrigReadout: function( trigValueNumberText, trigValueFraction ) {
if ( this.viewProperties.specialAnglesVisibleProperty.value ) {
this.setSpecialAngleTrigReadout( trigValueFraction );
}
let trigValue;
if( this.trigLabelString === 'sin' ) {
if ( this.trigLabelString === 'sin' ) {
trigValue = this.trigTourModel.sin();
}
else if( this.trigLabelString === 'cos' ) {
else if ( this.trigLabelString === 'cos' ) {
trigValue = this.trigTourModel.cos();
}
else if( this.trigLabelString === 'tan' ) {
else if ( this.trigLabelString === 'tan' ) {
trigValue = this.trigTourModel.tan();
}
assert && assert( typeof trigValue !== 'undefined', 'trigLabelString must be one of cos, tan, or sin' );
Expand Down
4 changes: 2 additions & 2 deletions js/trig-tour/view/readout/ReadoutNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ define( require => {
const cosLabelFractionValueRow = new LabelFractionValueRow( 'cos', model, viewProperties );
const tanLabelFractionValueRow = new LabelFractionValueRow( 'tan', model, viewProperties );

const row3 = new Node( {
const row3 = new Node( {
children: [ sinLabelFractionValueRow, cosLabelFractionValueRow, tanLabelFractionValueRow ],
maxWidth: maxPanelWidth
} );
Expand Down Expand Up @@ -113,6 +113,6 @@ define( require => {
}

trigTour.register( 'ReadoutNode', ReadoutNode );

return inherit( Node, ReadoutNode );
} );

0 comments on commit e8e5814

Please sign in to comment.