Skip to content

Commit

Permalink
factor out dilation constants, #192
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Aug 27, 2020
1 parent ef1a97e commit 49d6ef2
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions js/common/view/proportions/ProportionsGraphNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ class Column extends VBox {
tandem: Tandem.REQUIRED
}, options );

// Check box to hide the column
const labelNode = new Text( gene.name, {
font: COLUMN_LABEL_FONT,
maxWidth: 100 // determined empirically
Expand All @@ -342,12 +343,17 @@ class Column extends VBox {
merge( {}, NaturalSelectionConstants.CHECKBOX_OPTIONS, {
tandem: options.tandem.createTandem( 'checkbox' )
} ) );
checkbox.mouseArea = checkbox.localBounds.dilatedXY( 8, 6 );
checkbox.touchArea = checkbox.localBounds.dilatedXY( 8, 6 );

// Pointer areas for the checkbox
const xDilation = 8;
const yDilation = 6;
checkbox.mouseArea = checkbox.localBounds.dilatedXY( xDilation, yDilation );
checkbox.touchArea = checkbox.localBounds.dilatedXY( xDilation, yDilation );

const startBarNode = new ProportionsBarNode( gene.color, startNormalCount, startMutantCount, valuesVisibleProperty, {
tandem: options.tandem.createTandem( 'startBarNode' )
} );

const endBarNode = new ProportionsBarNode( gene.color, endNormalCount, endMutantCount, valuesVisibleProperty, {
tandem: options.tandem.createTandem( 'endBarNode' )
} );
Expand Down

0 comments on commit 49d6ef2

Please sign in to comment.