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 1f0cf34 commit 2176286
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions js/common/view/MoleculeShapesScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ define( function( require ) {
var moleculeShapes = require( 'MOLECULE_SHAPES/moleculeShapes' );
var MoleculeShapesColorProfile = require( 'MOLECULE_SHAPES/common/view/MoleculeShapesColorProfile' );
var MoleculeShapesGlobals = require( 'MOLECULE_SHAPES/common/MoleculeShapesGlobals' );
var Mouse = require( 'SCENERY/input/Mouse' );
var Plane3 = require( 'DOT/Plane3' );
var Ray3 = require( 'DOT/Ray3' );
var Rectangle = require( 'SCENERY/nodes/Rectangle' );
Expand Down Expand Up @@ -176,7 +177,7 @@ define( function( require ) {
var multiDragListener = {
down: function( event, trail ) {
// ignore non-main-mouse-buttons
if ( event.pointer.isMouse && event.domEvent && event.domEvent.button !== 0 ) {
if ( event.pointer instanceof Mouse && event.domEvent && event.domEvent.button !== 0 ) {
return;
}

Expand All @@ -188,7 +189,7 @@ define( function( require ) {
var dragMode = null;
var draggedParticle = null;

var pair = self.getElectronPairUnderPointer( event.pointer, !event.pointer.isMouse );
var pair = self.getElectronPairUnderPointer( event.pointer, !( event.pointer instanceof Mouse ) );
if ( pair && !pair.userControlledProperty.get() ) {
// we start dragging that pair group with this pointer, moving it along the sphere where it can exist
dragMode = 'pairExistingSpherical';
Expand Down

0 comments on commit 2176286

Please sign in to comment.