From 16bb63bc1bfac282e758072c74fc6357e986dbe1 Mon Sep 17 00:00:00 2001 From: denz1994 Date: Tue, 30 Apr 2019 13:55:29 -0400 Subject: [PATCH] Dilated touch areas for NumberControl arrow buttons. https://github.com/phetsims/masses-and-springs/issues/348 --- js/common/view/GravityAndDampingControlNode.js | 6 +++++- js/common/view/MassValueControlPanel.js | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/js/common/view/GravityAndDampingControlNode.js b/js/common/view/GravityAndDampingControlNode.js index 6b9c54ab..60d65cc9 100644 --- a/js/common/view/GravityAndDampingControlNode.js +++ b/js/common/view/GravityAndDampingControlNode.js @@ -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 diff --git a/js/common/view/MassValueControlPanel.js b/js/common/view/MassValueControlPanel.js index 202fc999..50ff9ffc 100644 --- a/js/common/view/MassValueControlPanel.js +++ b/js/common/view/MassValueControlPanel.js @@ -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 ] } );