From 1a107bcfda5dd52fa43dac19ca6fcf39ebb22c50 Mon Sep 17 00:00:00 2001 From: zepumph Date: Tue, 16 Feb 2021 15:51:25 -0900 Subject: [PATCH] Create Pointer.isTouchLike(), convert usages of instance Touch to use it, https://github.com/phetsims/scenery/issues/1156 --- js/HomeScreenButton.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/HomeScreenButton.js b/js/HomeScreenButton.js index 29014ea9..4f42f8f4 100644 --- a/js/HomeScreenButton.js +++ b/js/HomeScreenButton.js @@ -17,7 +17,6 @@ import merge from '../../phet-core/js/merge.js'; import PhetColorScheme from '../../scenery-phet/js/PhetColorScheme.js'; import PhetFont from '../../scenery-phet/js/PhetFont.js'; import PDOMPeer from '../../scenery/js/accessibility/pdom/PDOMPeer.js'; -import Touch from '../../scenery/js/input/Touch.js'; import FireListener from '../../scenery/js/listeners/FireListener.js'; import Node from '../../scenery/js/nodes/Node.js'; import Rectangle from '../../scenery/js/nodes/Rectangle.js'; @@ -171,7 +170,7 @@ class HomeScreenButton extends VBox { // touchover, in which case we need to guard on touchdown since we don't want to double fire for touchover and // touchdown, see https://github.com/phetsims/joist/issues/624 const buttonDown = () => { - if ( isSelectedProperty.value && ( !( fireListener.pointer instanceof Touch ) || buttonWasAlreadySelected ) ) { + if ( isSelectedProperty.value && ( !( fireListener.pointer.isTouchLike() ) || buttonWasAlreadySelected ) ) { homeScreenModel.screenProperty.value = screen; } else {