Skip to content

Commit

Permalink
Cleaned up whitespace, see #201
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Nov 13, 2016
1 parent f528018 commit 2654146
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,9 @@ define( function( require ) {

// add the view element as a child
this.addChild( switchNode );

}

balloonsAndStaticElectricity.register( 'AccessibleABSwitchNode', AccessibleABSwitchNode );

return inherit( AccessibleNode, AccessibleABSwitchNode );

} );
} );
Original file line number Diff line number Diff line change
Expand Up @@ -234,5 +234,4 @@ define( function( require ) {
},
get dragBounds() { return this.getDragBounds(); },
} );

} );
} );
31 changes: 14 additions & 17 deletions js/balloons-and-static-electricity/accessibility/AccessibleNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ define( function( require ) {
// incorrect behavior - once fixed in scenery remove this line
// temporarily named 'isFocusable' due to collision with scenery/Node
this._isFocusable = options.focusable;
options = _.omit( options, 'focusable');
options = _.omit( options, 'focusable' );

Node.call( this, options );
var self = this;
Expand Down Expand Up @@ -257,9 +257,9 @@ define( function( require ) {
},

/**
* Get an id referencing the description element of this node. Useful when you want to
* Get an id referencing the description element of this node. Useful when you want to
* set aria-describedby on a DOM element that is far from this one in the scene graph.
*
*
* @return {string}
*/
getDescriptionElementID: function() {
Expand All @@ -268,9 +268,9 @@ define( function( require ) {
},

/**
* Get an id referencing the label element of this node. Useful when you want to
* Get an id referencing the label element of this node. Useful when you want to
* set aria-labelledby on a DOM element that is far from this one in the scene graph.
*
*
* @return {string}
*/
getLabelElementID: function() {
Expand All @@ -279,10 +279,10 @@ define( function( require ) {
},

/**
* Add the 'aria-describedby' attribute to this node's dom element. If no description
* Add the 'aria-describedby' attribute to this node's dom element. If no description
* id is passed in, the dom element will automatically be described by this element's
* description.
*
*
* @param {string} [descriptionID] - optional id referencing the description element
*/
setAriaDescribedBy: function( descriptionID ) {
Expand All @@ -292,10 +292,10 @@ define( function( require ) {


/**
* Add the 'aria-labelledby' attribute to this node's dom element. If no description
* Add the 'aria-labelledby' attribute to this node's dom element. If no description
* id is passed in, the dom element will automatically be described by this element's
* label elemnet.
*
*
* @param {string} [labelID] - optional id referencing the description element
*/
setAriaLabelledBy: function( labelID ) {
Expand Down Expand Up @@ -440,8 +440,8 @@ define( function( require ) {
for ( var i = 0; i < children.length; i++ ) {

// searching for the HTML type Node.ELEMENT_NODE, which is equal to 1
if ( children[i].nodeType === 1 ) {
linearDOM[i] = ( children[ i ] );
if ( children[ i ].nodeType === 1 ) {
linearDOM[ i ] = ( children[ i ] );
}
}
return linearDOM;
Expand Down Expand Up @@ -529,12 +529,11 @@ define( function( require ) {
return nextFocusable || this.domElement;
},


/**
* Get a child element with an id. This should only be used if the element is not in the document.
* If the element is in the document, document.getElementById is a faster (and more conventional)
* option. If the element is not yet in the document this function might be helpful.
*
*
* @param {DOMElement} parentElement
* @param {string} childId
* @return {DOMElement}
Expand All @@ -559,7 +558,7 @@ define( function( require ) {

/**
* Append a child elelement, but only if it has content.
*
*
* @param {DOMElement} domElement - the dom element to append the child
* @param {DOMElement} childElement - the child element to append
*/
Expand All @@ -568,7 +567,5 @@ define( function( require ) {
domElement.appendChild( childElement );
}
}

} );

} );
} );
Original file line number Diff line number Diff line change
Expand Up @@ -127,5 +127,4 @@ define( function( require ) {
}
}
} );

} );
} );
Original file line number Diff line number Diff line change
Expand Up @@ -955,5 +955,4 @@ define( function( require ) {
return velocityDescription;
},
} );

} );
} );
Original file line number Diff line number Diff line change
Expand Up @@ -302,4 +302,4 @@ define( function( require ) {
this.shownProperty.value = true;
}
} );
} );
} );
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,4 @@ define( function( require ) {
balloonsAndStaticElectricity.register( 'ReaderDisplayNode', ReaderDisplayNode );

return inherit( Rectangle, ReaderDisplayNode, {} );

} );
} );
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ define( function( require ) {
balloonsAndStaticElectricity.register( 'StringMaps', StringMaps );

return StringMaps;
} );
} );
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ define( function( require ) {
balloonsAndStaticElectricity.register( 'BalloonColorsEnum', BalloonColorsEnum );

return BalloonColorsEnum;
} );
} );

0 comments on commit 2654146

Please sign in to comment.