Skip to content

Commit

Permalink
Misc typo fixes, rename NumberControl options object, see #30
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg committed Mar 1, 2018
1 parent 2964ad6 commit a3e726a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
3 changes: 2 additions & 1 deletion js/view/ISLCForceArrowNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ define( function( require ) {

options = _.extend( {
defaultDirection: 'left',
attractNegative: true, // if true, arrows will point towards each other if forces is negative
attractNegative: true, // if true, arrows will point towards each other if force is negative
arrowNodeLineWidth: 0.25,

// label options
Expand Down Expand Up @@ -97,6 +97,7 @@ define( function( require ) {
Node.call( this, {} );
this.addChild( this.arrowText );
this.addChild( this.arrow );

this.y = 0;
}

Expand Down
13 changes: 4 additions & 9 deletions js/view/ISLCObjectControlPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ define( function( require ) {
fill: '#EDEDED',
xMargin: 10,
yMargin: 4,
// minWidth: 224,
resize: false,
align: 'right',

Expand Down Expand Up @@ -100,14 +99,12 @@ define( function( require ) {
};
options.majorTicks.push( tick );
}

var tandem = options.tandem;

// pull out options that apply to the Panel, and those that apply to the NumberControl
var optionsFilter = [ 'fill', 'xMargin', 'yMargin', 'resize', 'align', 'right', 'left', 'top', 'tandem' ];

var panelOptions = _.pick( options, optionsFilter );

options = _.omit( options, optionsFilter );
var numberControlOptions = _.omit( options, optionsFilter );

var numberControl = new NumberControl(
titleString,
Expand All @@ -116,18 +113,16 @@ define( function( require ) {
_.extend( {
tandem: tandem.createTandem( 'numberControl' ),
valueAlign: 'center'
},
options ) );
}, numberControlOptions ) );

// a11y - the panel has a group focus highlight
// a11y - the panel has a group focus highlight rather than the number control
numberControl.groupFocusHighlight = false;

Panel.call( this, numberControl, panelOptions );

this.groupFocusHighlight = new GroupFocusHighlightFromNode( this, {
useLocalBounds: true,
dilationCoefficient: 3.7,

outerStroke: FocusHighlightPath.OUTER_DARK_GROUP_FOCUS_COLOR,
innerStroke: FocusHighlightPath.INNER_DARK_GROUP_FOCUS_COLOR,
} );
Expand Down

0 comments on commit a3e726a

Please sign in to comment.