Skip to content

Commit

Permalink
Create Pointer.isTouchLike(), convert usages of instance Touch to use…
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Feb 17, 2021
1 parent 1e60801 commit 1a107bc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions js/HomeScreenButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 1a107bc

Please sign in to comment.