Skip to content

Commit

Permalink
Dilated touch areas for NumberControl arrow buttons.
Browse files Browse the repository at this point in the history
  • Loading branch information
Denz1994 committed Apr 30, 2019
1 parent 2fd6cd8 commit 16bb63b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion js/common/view/GravityAndDampingControlNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,11 @@ define( function( require ) {
}
]
},
arrowButtonOptions: { scale: 0.55 }
arrowButtonOptions: {
scale: 0.55,
touchAreaXDilation: 22,
touchAreaYDilation: 18
}
} );

// Added logic for compatibility with Masses and Springs: Basics
Expand Down
6 changes: 5 additions & 1 deletion js/common/view/MassValueControlPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,11 @@ define( function( require ) {
],
trackSize: trackSizeProperty.value
},
arrowButtonOptions: { scale: 0.5 }
arrowButtonOptions: {
scale: 0.5,
touchAreaXDilation: 16,
touchAreaYDilation: 16
}
} );
var contentNode = new Node( { children: [ numberControl, massNodeIcon ] } );

Expand Down

0 comments on commit 16bb63b

Please sign in to comment.