From 2c0937338e836f92a27f93f00af6d0fc1e91f757 Mon Sep 17 00:00:00 2001 From: Jonathan Olson Date: Wed, 17 Jan 2018 12:18:54 -0700 Subject: [PATCH] Removing pointer type shortcuts, see https://github.com/phetsims/scenery/issues/724 --- js/common/view/ItemDragListener.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/common/view/ItemDragListener.js b/js/common/view/ItemDragListener.js index 7d0570fa..07a712bd 100644 --- a/js/common/view/ItemDragListener.js +++ b/js/common/view/ItemDragListener.js @@ -17,6 +17,7 @@ define( function( require ) { var inherit = require( 'PHET_CORE/inherit' ); var SimpleDragHandler = require( 'SCENERY/input/SimpleDragHandler' ); var SumToZeroNode = require( 'EQUALITY_EXPLORER/common/view/SumToZeroNode' ); + var Touch = require( 'SCENERY/input/Touch' ); /** * @param {Node} itemNode - Node that the listener is attached to @@ -196,7 +197,7 @@ define( function( require ) { // touch: center icon above finger, so that most of icon is clearly visible // mouse: move bottom center of icon to pointer location var xOffset = 0; - var yOffset = ( event.pointer.isTouch ) ? -( 1.5 * this.item.icon.height ) : -( 0.5 * this.item.icon.height ); + var yOffset = ( event.pointer instanceof Touch ) ? -( 1.5 * this.item.icon.height ) : -( 0.5 * this.item.icon.height ); var location = this.itemNode.globalToParentPoint( event.pointer.point ).plusXY( xOffset, yOffset ); // constrain to drag bounds