Skip to content

Commit

Permalink
Removing pointer type shortcuts, see phetsims/scenery#724
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanolson committed Jan 17, 2018
1 parent 5fcbaec commit 2c09373
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/common/view/ItemDragListener.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2c09373

Please sign in to comment.