Skip to content

Commit

Permalink
Removing pointer type shortcuts, see phetsims/scenery#724
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanolson committed Jan 17, 2018
1 parent 47434e1 commit 5333673
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion js/proportional/model/ProportionalAreaModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ define( function( require ) {
this.tilesVisibleProperty = new BooleanProperty( false );

// @public {BooleanProperty}
this.countsVisibleProperty = new BooleanProperty( false );
this.countsVisibleProperty = new BooleanProperty( true );
}

areaModelCommon.register( 'ProportionalAreaModel', ProportionalAreaModel );
Expand Down
15 changes: 14 additions & 1 deletion js/proportional/view/ProportionalAreaScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,20 @@ define( function( require ) {
} );

model.currentAreaProperty.link( function( area ) {
checkboxContainer.children = [ gridCheckbox ].concat( area.countingAvailable ? [ countingCheckbox ] : [] ).concat( area.tilesAvailable ? [ tileCheckbox ] : [] );
// TODO: some cleanup?
var children = [];

// Don't show the grid/tiles checkboxes if counting is enabled
if ( !area.countingAvailable ) {
children.push( gridCheckbox );
if ( area.tilesAvailable ) {
children.push( tileCheckbox );
}
}
else {
children.push( countingCheckbox );
}
checkboxContainer.children = children;
} );

this.addChild( checkboxContainer );
Expand Down

0 comments on commit 5333673

Please sign in to comment.